summaryrefslogtreecommitdiff
path: root/pp_ctl.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 /pp_ctl.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 'pp_ctl.c')
-rw-r--r--pp_ctl.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index d335281e61..55ffb1933b 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -831,11 +831,7 @@ PP(pp_formline)
/* Formats aren't yet marked for locales, so assume "yes". */
{
STORE_NUMERIC_STANDARD_SET_LOCAL();
-#ifdef USE_SNPRINTF
- snprintf(t, SvLEN(PL_formtarget) - (t - SvPVX(PL_formtarget)), fmt, (int) fieldsize, (int) arg & 255, value);
-#else
- sprintf(t, fmt, (int) fieldsize, (int) arg & 255, value);
-#endif /* ifdef USE_SNPRINTF */
+ my_snprintf(t, SvLEN(PL_formtarget) - (t - SvPVX(PL_formtarget)), fmt, (int) fieldsize, (int) arg & 255, value);
RESTORE_NUMERIC_STANDARD();
}
t += fieldsize;
@@ -2773,13 +2769,8 @@ Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, const char *code, PAD** padp)
len = SvCUR(sv);
}
else
-#ifdef USE_SNPRINTF
- len = snprintf(tmpbuf, sizeof(tbuf), "_<(%.10s_eval %lu)", code,
- (unsigned long)++PL_evalseq);
-#else
- len = my_sprintf(tmpbuf, "_<(%.10s_eval %lu)", code,
- (unsigned long)++PL_evalseq);
-#endif /* ifdef USE_SNPRINTF */
+ len = my_snprintf(tmpbuf, sizeof(tbuf), "_<(%.10s_eval %lu)", code,
+ (unsigned long)++PL_evalseq);
SAVECOPFILE_FREE(&PL_compiling);
CopFILE_set(&PL_compiling, tmpbuf+2);
SAVECOPLINE(&PL_compiling);
@@ -3461,11 +3452,7 @@ PP(pp_entereval)
len = SvCUR(temp_sv);
}
else
-#ifdef USE_SNPRINTF
- len = snprintf(tmpbuf, sizeof(tbuf), "_<(eval %lu)", (unsigned long)++PL_evalseq);
-#else
- len = my_sprintf(tmpbuf, "_<(eval %lu)", (unsigned long)++PL_evalseq);
-#endif /* ifdef USE_SNPRINTF */
+ len = my_snprintf(tmpbuf, sizeof(tbuf), "_<(eval %lu)", (unsigned long)++PL_evalseq);
SAVECOPFILE_FREE(&PL_compiling);
CopFILE_set(&PL_compiling, tmpbuf+2);
SAVECOPLINE(&PL_compiling);