summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-08-18 15:55:59 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-08-24 23:25:35 -0700
commitc086f97a1425c2aa61dd3625b890e1236b1d4bc4 (patch)
treefd4908bcc5e2628906abfff85941eb904a64d244 /proto.h
parentf988db8ca20c402ad7c8038ee1f7a544b9e687e2 (diff)
downloadperl-c086f97a1425c2aa61dd3625b890e1236b1d4bc4.tar.gz
Add find_rundefsv2 function
Subs in the CORE package with a (_) prototype will use this. This accepts a CV and a sequence number, so that one can use it to find the $_ in the caller’s scope. It only uses the topmost call of a subroutine that is being called recur- sively, so it’s not really a general-purpose function. But it suffices for &CORE::abs and friends.
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 73a322db2d..ea83f25b70 100644
--- a/proto.h
+++ b/proto.h
@@ -975,6 +975,11 @@ PERL_CALLCONV CV* Perl_find_runcv(pTHX_ U32 *db_seqp)
__attribute__warn_unused_result__;
PERL_CALLCONV SV* Perl_find_rundefsv(pTHX);
+PERL_CALLCONV SV* Perl_find_rundefsv2(pTHX_ CV *cv, U32 seq)
+ __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_FIND_RUNDEFSV2 \
+ assert(cv)
+
PERL_CALLCONV PADOFFSET Perl_find_rundefsvoffset(pTHX)
__attribute__deprecated__;