diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-10-04 13:58:49 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-10-04 13:58:49 -0700 |
commit | afa74577a6e8d7cf96f7c62e4acca52fda973699 (patch) | |
tree | a269635929639ed9dbf10beae4f99382f480a8f7 /sv.c | |
parent | b20c4ee1fc23699f6cbe3ce96cc8fe6eb4c52c4c (diff) | |
download | perl-afa74577a6e8d7cf96f7c62e4acca52fda973699.tar.gz |
[perl #45133] -0.0 has variable Boolean value
This patch makes -0.0 stringify as "0" (while leaving sprintf %g/%f
unchanged).
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -2741,13 +2741,11 @@ Perl_sv_2pv_flags(pTHX_ register SV *const sv, STRLEN *const lp, const I32 flags { dVAR; -#ifdef FIXNEGATIVEZERO if (len == 2 && tbuf[0] == '-' && tbuf[1] == '0') { tbuf[0] = '0'; tbuf[1] = 0; len = 1; } -#endif SvUPGRADE(sv, SVt_PV); if (lp) *lp = len; @@ -2934,12 +2932,10 @@ Perl_sv_2pv_flags(pTHX_ register SV *const sv, STRLEN *const lp, const I32 flags Gconvert(SvNVX(sv), NV_DIG, 0, s); } RESTORE_ERRNO; -#ifdef FIXNEGATIVEZERO if (*s == '-' && s[1] == '0' && !s[2]) { s[0] = '0'; s[1] = 0; } -#endif while (*s) s++; #ifdef hcx if (s[-1] == '.') |