summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-09-17 13:32:18 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-09-17 13:32:18 +0000
commitb5b5a8f0780c94d6973849925747efe92490a7da (patch)
treee56811095a9475ce567bc644e8de17bde8d48367 /universal.c
parentc5d12488d9324671cce63c4feed858f82530110e (diff)
downloadperl-b5b5a8f0780c94d6973849925747efe92490a7da.tar.gz
A better version of change #28847
p4raw-link: @28847 on //depot/perl: e24f8a798207476769992a3387804af506c43eab p4raw-id: //depot/perl@28861
Diffstat (limited to 'universal.c')
-rw-r--r--universal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/universal.c b/universal.c
index 7bbcbdbed9..52395cce69 100644
--- a/universal.c
+++ b/universal.c
@@ -688,7 +688,13 @@ XS(XS_version_qv)
if ( SvNOK(ver) ) /* may get too much accuracy */
{
char tbuf[64];
+#ifdef USE_LOCALE_NUMERIC
+ char *loc = setlocale(LC_NUMERIC, "C");
+#endif
const STRLEN len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVgf, SvNVX(ver));
+#ifdef USE_LOCALE_NUMERIC
+ setlocale(LC_NUMERIC, loc);
+#endif
version = savepvn(tbuf, len);
}
else