summaryrefslogtreecommitdiff
path: root/embed.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-08-21 01:37:42 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-08-21 01:37:42 -0700
commitea5703f415b018a4574fdbed54af0a53bd0e6095 (patch)
tree64de8d4753fea26a5f97ada9d0861c1d6eae4111 /embed.h
parentf912a4747f84557c46b88101928c48622c8b8624 (diff)
downloadperl-ea5703f415b018a4574fdbed54af0a53bd0e6095.tar.gz
Refactor unpack’s newDEFSVOP logic; correct prototype
unpack is the only op that takes an implicit $_ for its second argu- ment. (For others it’s the first.) Instead of special-casing unpack with its own ck_ routine, we can sim- ply modify the logic in ck_fun to apply OA_DEFGV to the first optional argument, not just the first argument. Currently OA_DEFGV is not set in PL_opargs[OP_UNPACK], which means the automatically-generated prototype is ($;$), instead of ($_). This commit sets the flag on the op, changes it to use ck_fun directly, and updates ck_fun and the prototype-generation code accord- ingly. I couldn’t put this in multiple commits, as the changes are interdependent.
Diffstat (limited to 'embed.h')
-rw-r--r--embed.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/embed.h b/embed.h
index 7fc3b211b8..26d1bdb5b7 100644
--- a/embed.h
+++ b/embed.h
@@ -1006,7 +1006,6 @@
#define ck_substr(a) Perl_ck_substr(aTHX_ a)
#define ck_svconst(a) Perl_ck_svconst(aTHX_ a)
#define ck_trunc(a) Perl_ck_trunc(aTHX_ a)
-#define ck_unpack(a) Perl_ck_unpack(aTHX_ a)
#define convert(a,b,c) Perl_convert(aTHX_ a,b,c)
#define core_prototype(a,b,c,d) Perl_core_prototype(aTHX_ a,b,c,d)
#define create_eval_scope(a) Perl_create_eval_scope(aTHX_ a)