summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2013-10-21 15:43:06 +0100
committerDavid Mitchell <davem@iabyn.com>2013-10-21 15:43:06 +0100
commit9d176cd8dda1d6b2f98386843a92abe96e8a328e (patch)
treec1d12e92fd29017f8690fbf5774e03cdffe90654 /proto.h
parent59000498ecb28d4767eac94dc70de651f1b3c03e (diff)
downloadperl-9d176cd8dda1d6b2f98386843a92abe96e8a328e.tar.gz
make sv_2bool_flags() non-recursive on overload
When Perl_sv_2bool_flags() has an overloaded arg, it calls SvTRUE() on the SV returned from the overload method. This indirectly calls sv_2bool_flags() again. Change it so that sv_2bool_flags() just iterates the new overload value each time. 2 callsites were converted to gotos. A SvTRUE_common was expanded so goto can be used. This function's machine code size on VC2003 32 bits dropped by 0x24 bytes after this patch.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto.h b/proto.h
index 54c6b4f50a..b81b526c3f 100644
--- a/proto.h
+++ b/proto.h
@@ -3866,7 +3866,7 @@ PERL_CALLCONV void Perl_sub_crush_depth(pTHX_ CV* cv)
/* PERL_CALLCONV bool sv_2bool(pTHX_ SV *const sv)
__attribute__nonnull__(pTHX_1); */
-PERL_CALLCONV bool Perl_sv_2bool_flags(pTHX_ SV *const sv, const I32 flags)
+PERL_CALLCONV bool Perl_sv_2bool_flags(pTHX_ SV *sv, I32 flags)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_SV_2BOOL_FLAGS \
assert(sv)