summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-10-04 13:58:49 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-10-04 13:58:49 -0700
commitafa74577a6e8d7cf96f7c62e4acca52fda973699 (patch)
treea269635929639ed9dbf10beae4f99382f480a8f7 /sv.c
parentb20c4ee1fc23699f6cbe3ce96cc8fe6eb4c52c4c (diff)
downloadperl-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.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/sv.c b/sv.c
index 58d0b40dc0..4178dd356d 100644
--- a/sv.c
+++ b/sv.c
@@ -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] == '.')