summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-11-03 14:57:11 +0000
committerNicholas Clark <nick@ccl4.org>2010-11-03 15:04:34 +0000
commit25a9ffce153b0e67cfefd260754edeb097da5be7 (patch)
tree6d7e60d1842fa73c3f0fcec7cc9a2e2272baf085 /proto.h
parent7d255dc8b56bf0fe58c3f8a5aa84ba17aade145f (diff)
downloadperl-25a9ffce153b0e67cfefd260754edeb097da5be7.tar.gz
Add Perl_amagic_deref_call() to implement the bulk of tryAMAGICunDEREF_var().
This removes around 300 bytes of object code from each place it was previously inlined. It also provides a better interface - quite a lot of the core currently bodges things by creating a local variable C<SV **sp = &sv> to use the macro. Change the XS::APItest wrapper to amagic_deref_call().
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index ffbf147556..17cacb640a 100644
--- a/proto.h
+++ b/proto.h
@@ -34,6 +34,11 @@ PERL_CALLCONV SV* Perl_amagic_call(pTHX_ SV* left, SV* right, int method, int di
#define PERL_ARGS_ASSERT_AMAGIC_CALL \
assert(left); assert(right)
+PERL_CALLCONV SV * Perl_amagic_deref_call(pTHX_ SV *ref, int method)
+ __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_AMAGIC_DEREF_CALL \
+ assert(ref)
+
PERL_CALLCONV I32 Perl_apply(pTHX_ I32 type, SV** mark, SV** sp)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_3);