[tz] source code changes in tzcode2013d: int_:fast32_t
jonathan.leffler at gmail.com
Sun Jul 21 12:24:28 UTC 2013
You should look up the details of the types defined in the C99 header
<stdint.h>. It conditionally defines types like int32_t (it won't be
defined if the machine has no 32-bit type — fairly unlikely these days, but
there are/were 36-bit machines in times past), and unconditionally defines
types such as int_least32_t and int_fast32_t. The type int_least32_t is an
alternative name for a type that is at least 32 bits wide; int_fast32_t is
an alternative name for the fastest type that is at least 32 bits wide.
These types must be supported in C99 because long must be at least 32 bits
So, the names in use are carefully chosen from the C99 standard.
On Sun, Jul 21, 2013 at 4:20 AM, Alois Treindl <alois at astro.ch> wrote:
> I noticed that a lot of source code changes were done in tzcode, for
> example many variables which were of type long have been changed
> to int_fast32_t.
> On my system, a x86_64 Linux, we get: typedef long int_fast32_t.
> So as expected, it comes out the same. long is 64 bit.
> But I wonder about the rationale behind the naming of this type: is it
> supposed to hold only 32-bit values? If it is supposed not to suffer from
> 32-bit overflow problems, i.e. meant to be wider than 32 bits, why is it
> named the way it is named?
> A general question: there is very little documentation for the source code
> in general. Would it not be appropriate for the maintainers of the code to
> include more internal documentation?
Jonathan Leffler <jonathan.leffler at gmail.com> #include <disclaimer.h>
Guardian of DBD::Informix - v2013.0521 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the tz