summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-01-15 15:48:57 -0700
committerKarl Williamson <khw@cpan.org>2018-01-30 22:49:03 -0700
commit688523a07c52ae6d2b46270f0eebc90807f34595 (patch)
tree74b578ab81e0b5fd557d858f0bd21c13819bafec /sv.c
parent4a6e2ba6734aaf982dd135520aa5ce3ddcfc4d6e (diff)
downloadperl-688523a07c52ae6d2b46270f0eebc90807f34595.tar.gz
Simplify some LC_NUMERIC macros
These macros are marked as subject to change and are not documented externally. I don't know what I was thinking when I named some of them, but whatever no longer makes sense to me. Simplify them, and change so there is only one restore macro to remember.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sv.c b/sv.c
index 0822b70630..58d4bf6394 100644
--- a/sv.c
+++ b/sv.c
@@ -2668,11 +2668,12 @@ Perl_sv_2nv_flags(pTHX_ SV *const sv, const I32 flags)
/* The logic to use SVt_PVNV if necessary is in sv_upgrade. */
sv_upgrade(sv, SVt_NV);
DEBUG_c({
- STORE_LC_NUMERIC_UNDERLYING_SET_STANDARD();
+ DECLARATION_FOR_LC_NUMERIC_MANIPULATION;
+ STORE_LC_NUMERIC_SET_STANDARD();
PerlIO_printf(Perl_debug_log,
"0x%" UVxf " num(%" NVgf ")\n",
PTR2UV(sv), SvNVX(sv));
- RESTORE_LC_NUMERIC_UNDERLYING();
+ RESTORE_LC_NUMERIC();
});
}
else if (SvTYPE(sv) < SVt_PVNV)
@@ -2809,10 +2810,11 @@ Perl_sv_2nv_flags(pTHX_ SV *const sv, const I32 flags)
return 0.0;
}
DEBUG_c({
- STORE_LC_NUMERIC_UNDERLYING_SET_STANDARD();
+ DECLARATION_FOR_LC_NUMERIC_MANIPULATION;
+ STORE_LC_NUMERIC_SET_STANDARD();
PerlIO_printf(Perl_debug_log, "0x%" UVxf " 2nv(%" NVgf ")\n",
PTR2UV(sv), SvNVX(sv));
- RESTORE_LC_NUMERIC_UNDERLYING();
+ RESTORE_LC_NUMERIC();
});
return SvNVX(sv);
}