diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-06 08:54:03 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-06 08:54:03 +0000 |
commit | 55f3590d981d472e2ca2027c95f8873bb0485b24 (patch) | |
tree | f6dfbcc27f3aafedc8536c55aa214d497cb0d3ba /sv.c | |
parent | 34b06dacb7d08d251fd34e73fbb3227302c523eb (diff) | |
download | perl-55f3590d981d472e2ca2027c95f8873bb0485b24.tar.gz |
bug in change#3602 (cpp conditionals not allowed inside macro args)
p4raw-link: @3602 on //depot/perl: 6520202708b2a849ca8538ed88e0f75376c3b2d7
p4raw-id: //depot/perl@3605
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 50 |
1 files changed, 28 insertions, 22 deletions
@@ -1217,14 +1217,13 @@ Perl_sv_2iv(pTHX_ register SV *sv) SvNVX(sv) = d; (void)SvNOK_on(sv); (void)SvIOK_on(sv); - DEBUG_c(PerlIO_printf(Perl_debug_log, #if defined(USE_LONG_DOUBLE) - "0x%lx 2nv(%Lg)\n", + DEBUG_c(PerlIO_printf(Perl_debug_log, "0x%lx 2nv(%Lg)\n", + (unsigned long)sv, SvNVX(sv))); #else - "0x%lx 2nv(%g)\n", + DEBUG_c(PerlIO_printf(Perl_debug_log, "0x%lx 2nv(%g)\n", + (unsigned long)sv, SvNVX(sv))); #endif - (unsigned long)sv, - SvNVX(sv))); if (SvNVX(sv) < (NV)IV_MAX + 0.5) SvIVX(sv) = I_V(SvNVX(sv)); else { @@ -1362,14 +1361,13 @@ Perl_sv_2uv(pTHX_ register SV *sv) SvNVX(sv) = d; (void)SvNOK_on(sv); (void)SvIOK_on(sv); - DEBUG_c(PerlIO_printf(Perl_debug_log, #if defined(USE_LONG_DOUBLE) - "0x%lx 2nv(%Lg)\n", + DEBUG_c(PerlIO_printf(Perl_debug_log, "0x%lx 2nv(%Lg)\n", + (unsigned long)sv, SvNVX(sv))); #else - "0x%lx 2nv(%g)\n", + DEBUG_c(PerlIO_printf(Perl_debug_log, "0x%lx 2nv(%g)\n", + (unsigned long)sv, SvNVX(sv))); #endif - (unsigned long)sv, - SvNVX(sv))); if (SvNVX(sv) < -0.5) { SvIVX(sv) = I_V(SvNVX(sv)); goto ret_zero; @@ -1490,17 +1488,21 @@ Perl_sv_2nv(pTHX_ register SV *sv) sv_upgrade(sv, SVt_PVNV); else sv_upgrade(sv, SVt_NV); +#if defined(USE_LONG_DOUBLE) DEBUG_c({ RESTORE_NUMERIC_STANDARD(); - PerlIO_printf(Perl_debug_log, -#if defined(USE_LONG_DOUBLE) - "0x%lx num(%Lg)\n", + PerlIO_printf(Perl_debug_log, "0x%lx num(%Lg)\n", + (unsigned long)sv, SvNVX(sv)); + RESTORE_NUMERIC_LOCAL(); + }); #else - "0x%lx num(%g)\n", -#endif - (unsigned long)sv,SvNVX(sv))); + DEBUG_c({ + RESTORE_NUMERIC_STANDARD(); + PerlIO_printf(Perl_debug_log, "0x%lx num(%g)\n", + (unsigned long)sv, SvNVX(sv)); RESTORE_NUMERIC_LOCAL(); }); +#endif } else if (SvTYPE(sv) < SVt_PVNV) sv_upgrade(sv, SVt_PVNV); @@ -1525,17 +1527,21 @@ Perl_sv_2nv(pTHX_ register SV *sv) return 0.0; } SvNOK_on(sv); +#if defined(USE_LONG_DOUBLE) DEBUG_c({ RESTORE_NUMERIC_STANDARD(); - PerlIO_printf(Perl_debug_log, -#if defined(USE_LONG_DOUBLE) - "0x%lx 2nv(%Lg)\n", + PerlIO_printf(Perl_debug_log, "0x%lx 2nv(%Lg)\n", + (unsigned long)sv, SvNVX(sv)); + RESTORE_NUMERIC_LOCAL(); + }); #else - "0x%lx 1nv(%g)\n", -#endif - (unsigned long)sv,SvNVX(sv))); + DEBUG_c({ + RESTORE_NUMERIC_STANDARD(); + PerlIO_printf(Perl_debug_log, "0x%lx 1nv(%g)\n", + (unsigned long)sv, SvNVX(sv)); RESTORE_NUMERIC_LOCAL(); }); +#endif return SvNVX(sv); } |