diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-01-18 18:00:56 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-01-18 18:00:56 +0000 |
commit | 47031da69d9704a7f7f2f86084deec4a32cbaf6e (patch) | |
tree | 783af4f84a5bb20634ac866b52d8815e7c1adfb9 | |
parent | 51356d76dfe15ade87ec05687ff8665c7e8f3fb4 (diff) | |
download | perl-47031da69d9704a7f7f2f86084deec4a32cbaf6e.tar.gz |
Avoid an unused argument in S_sv_2iuv_non_preserve() by using
conditional compilation to only pass it in if it's needed.
p4raw-id: //depot/perl@33004
-rw-r--r-- | embed.fnc | 4 | ||||
-rw-r--r-- | embed.h | 12 | ||||
-rw-r--r-- | proto.h | 6 | ||||
-rw-r--r-- | sv.c | 11 |
4 files changed, 31 insertions, 2 deletions
@@ -1503,7 +1503,11 @@ sR |SV * |varname |NULLOK GV *gv|const char gvtype|PADOFFSET targ \ s |void |del_sv |NN SV *p # endif # if !defined(NV_PRESERVES_UV) +# ifdef DEBUGGING s |int |sv_2iuv_non_preserve |NN SV *sv|I32 numtype +# else +s |int |sv_2iuv_non_preserve |NN SV *sv +# endif # endif sR |I32 |expect_number |NN char** pattern # @@ -1481,9 +1481,15 @@ #endif # endif # if !defined(NV_PRESERVES_UV) +# ifdef DEBUGGING #ifdef PERL_CORE #define sv_2iuv_non_preserve S_sv_2iuv_non_preserve #endif +# else +#ifdef PERL_CORE +#define sv_2iuv_non_preserve S_sv_2iuv_non_preserve +#endif +# endif # endif #ifdef PERL_CORE #define expect_number S_expect_number @@ -3792,9 +3798,15 @@ #endif # endif # if !defined(NV_PRESERVES_UV) +# ifdef DEBUGGING #ifdef PERL_CORE #define sv_2iuv_non_preserve(a,b) S_sv_2iuv_non_preserve(aTHX_ a,b) #endif +# else +#ifdef PERL_CORE +#define sv_2iuv_non_preserve(a) S_sv_2iuv_non_preserve(aTHX_ a) +#endif +# endif # endif #ifdef PERL_CORE #define expect_number(a) S_expect_number(aTHX_ a) @@ -3972,9 +3972,15 @@ STATIC void S_del_sv(pTHX_ SV *p) # endif # if !defined(NV_PRESERVES_UV) +# ifdef DEBUGGING STATIC int S_sv_2iuv_non_preserve(pTHX_ SV *sv, I32 numtype) __attribute__nonnull__(pTHX_1); +# else +STATIC int S_sv_2iuv_non_preserve(pTHX_ SV *sv) + __attribute__nonnull__(pTHX_1); + +# endif # endif STATIC I32 S_expect_number(pTHX_ char** pattern) __attribute__warn_unused_result__ @@ -1862,10 +1862,13 @@ S_glob_2pv(pTHX_ GV * const gv, STRLEN * const len) /* For sv_2nv these three cases are "SvNOK and don't bother casting" */ STATIC int -S_sv_2iuv_non_preserve(pTHX_ register SV *sv, I32 numtype) +S_sv_2iuv_non_preserve(pTHX_ register SV *sv +# ifdef DEBUGGING + , I32 numtype +# endif + ) { dVAR; - PERL_UNUSED_ARG(numtype); /* Used only under DEBUGGING? */ DEBUG_c(PerlIO_printf(Perl_debug_log,"sv_2iuv_non '%s', IV=0x%"UVxf" NV=%"NVgf" inttype=%"UVXf"\n", SvPVX_const(sv), SvIVX(sv), SvNVX(sv), (UV)numtype)); if (SvNVX(sv) < (NV)IV_MIN) { (void)SvIOKp_on(sv); @@ -2143,7 +2146,11 @@ S_sv_2iuv_common(pTHX_ SV *sv) { 1 1 already read UV. so there's no point in sv_2iuv_non_preserve() attempting to use atol, strtol, strtoul etc. */ +# ifdef DEBUGGING sv_2iuv_non_preserve (sv, numtype); +# else + sv_2iuv_non_preserve (sv); +# endif } } #endif /* NV_PRESERVES_UV */ |