In perl.git, the branch smoke-me/jkeenan/petdance/129766-numeric-c has been updated
<http://perl5.git.perl.org/perl.git/commitdiff/a553709b3268269e11c434f2ea5d1a40746c552e?hp=71b5a22e109f7436dc781b62f17a3c70577943b5> discards 71b5a22e109f7436dc781b62f17a3c70577943b5 (commit) - Log ----------------------------------------------------------------- commit a553709b3268269e11c434f2ea5d1a40746c552e Author: Andy Lester <[email protected]> Date: Fri Sep 30 15:40:34 2016 -0400 Minor internal cleanups in numeric.c Simplified some variable instantiation in Perl_my_atof, including removing some unnecessary initialization. Removed some unnecessary casting in Perl_my_atof2. Added consts to three other internal vars. For: RT #129766 ----------------------------------------------------------------------- Summary of changes: perl.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/perl.h b/perl.h index 628315f..8444bc0 100644 --- a/perl.h +++ b/perl.h @@ -5719,11 +5719,18 @@ EXTCONST bool PL_valid_types_NV_set[]; /* In C99 we could use designated (named field) union initializers. * In C89 we need to initialize the member declared first. + * In C++ we need extern C initializers. * * With the U8_NV version you will want to have inner braces, * while with the NV_U8 use just the NV. */ + +#ifdef __cplusplus +#define INFNAN_U8_NV_DECL EXTERN_C const union { U8 u8[NVSIZE]; NV nv; } +#define INFNAN_NV_U8_DECL EXTERN_C const union { NV nv; U8 u8[NVSIZE]; } +#else #define INFNAN_U8_NV_DECL EXTCONST union { U8 u8[NVSIZE]; NV nv; } #define INFNAN_NV_U8_DECL EXTCONST union { NV nv; U8 u8[NVSIZE]; } +#endif /* if these never got defined, they need defaults */ #ifndef PERL_SET_CONTEXT -- Perl5 Master Repository
