2.29 freeze update: Last fortnight
TAMUKI Shoichi
tamuki@linet.gr.jp
Thu Jan 17 06:31:00 GMT 2019
Hello Rafal,
From: Rafal Luzynski <digitalfreak@lingonborough.com>
Subject: Re: 2.29 freeze update: Last fortnight
Date: Tue, 15 Jan 2019 17:52:58 +0100 (CET)
> 2. I still don't understand why the newly added argument of
> __strftime_internal yr_spec is of the type "int *" rather than just
> "int". Maybe it is correct and the reason is that I have not
> analyzed it carefully enough. I'm sorry, I am unable to analyze
> it more carefully this week.
The yr_spec variable is initially definded in my_strftime function,
and __strftime_internal function is called there.
The __strftime_internal function is a recursive structure that calls
itself in subformat: label within the function. The subformat: label
is used in the processing of %Ex, %D, %F, %R, %r, %EX, %T, and %EY.
The value of the yr_spec variable is updated while walking around
these functions, and it needs to be treated as if it were a global
variable. If it is called by value, the value is not retained.
Therefore, it is called by address.
In additon, since tzset_called variable used in %Z and %z processing
also needs to be treated as if it were a global variable in the same
way as above, call by address is used.
Regards,
TAMUKI Shoichi
More information about the Libc-alpha
mailing list