summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-05-13 01:28:49 +0300
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-05-12 20:57:07 +0000
commitd9fad198da41e1cd37600ae397146e27a413303d (patch)
tree79dab04c73d50aa2a12e95f128a8cc3361ec5908 /sv.c
parent54f961c9c7fe5166a70653b44c67c26122bfc1fd (diff)
downloadperl-d9fad198da41e1cd37600ae397146e27a413303d.tar.gz
Re: [PATCH] my_snprintf
Message-ID: <4464E1F1.9010706@gmail.com> p4raw-id: //depot/perl@28183
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/sv.c b/sv.c
index 6c7071dd18..37c84f426d 100644
--- a/sv.c
+++ b/sv.c
@@ -2660,13 +2660,8 @@ Perl_sv_2pv_flags(pTHX_ register SV *sv, STRLEN *lp, I32 flags)
if (SvIOKp(sv)) {
len = SvIsUV(sv)
-#ifdef USE_SNPRINTF
- ? snprintf(tbuf, sizeof(tbuf), "%"UVuf, (UV)SvUVX(sv))
- : snprintf(tbuf, sizeof(tbuf), "%"IVdf, (IV)SvIVX(sv));
-#else
- ? my_sprintf(tbuf, "%"UVuf, (UV)SvUVX(sv))
- : my_sprintf(tbuf, "%"IVdf, (IV)SvIVX(sv));
-#endif /* #ifdef USE_SNPRINTF */
+ ? my_snprintf(tbuf, sizeof(tbuf), "%"UVuf, (UV)SvUVX(sv))
+ : my_snprintf(tbuf, sizeof(tbuf), "%"IVdf, (IV)SvIVX(sv));
} else {
Gconvert(SvNVX(sv), NV_DIG, 0, tbuf);
len = strlen(tbuf);
@@ -9270,13 +9265,8 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
* --jhi */
#if defined(HAS_LONG_DOUBLE)
elen = ((intsize == 'q')
-# ifdef USE_SNPRINTF
- ? snprintf(PL_efloatbuf, PL_efloatsize, ptr, nv)
- : snprintf(PL_efloatbuf, PL_efloatsize, ptr, (double)nv));
-# else
- ? my_sprintf(PL_efloatbuf, ptr, nv)
- : my_sprintf(PL_efloatbuf, ptr, (double)nv));
-# endif /* #ifdef USE_SNPRINTF */
+ ? my_snprintf(PL_efloatbuf, PL_efloatsize, ptr, nv)
+ : my_snprintf(PL_efloatbuf, PL_efloatsize, ptr, (double)nv));
#else
elen = my_sprintf(PL_efloatbuf, ptr, nv);
#endif