develooper Front page | perl.perl5.porters | Postings from December 2017

New macros available for some C99 typedefs missing in C89

From:
Karl Williamson
Date:
December 18, 2017 20:16
Subject:
New macros available for some C99 typedefs missing in C89
Message ID:
02086938-4d27-7b4a-515a-98b1f3492438@khwilliamson.com
Commit 247cee9ff410fe6e91536ff55cfaf5498db96770 added

PERL_INT_FAST8_T
PERL_UINT_FAST8_T
PERL_INT_FAST16_T
PERL_UINT_FAST16_T

which emulate the respective C99 typedefs on non-C99 compilers.  These 
are marked for core and core extension use only until we are sure this 
is a good idea.

Often, I write a loop whose max value is much less than an int.  This 
allows one to specify the minimum size needed, but telling the compiler 
to use a larger sized one if it deems that the smaller size creates a 
performance penalty.

Previously, there was added

PERL_UINT_MAX_T
PERL_INT_MAX_T

typedefs that evaluate to the longest type on the platform.  This would 
allow some code that uses #ifdef's about quads to not have to have the 
#ifdef's.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About