summaryrefslogtreecommitdiff
path: root/proto.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 /proto.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 'proto.h')
-rw-r--r--proto.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/proto.h b/proto.h
index 814b710f1b..73f52c8680 100644
--- a/proto.h
+++ b/proto.h
@@ -544,12 +544,6 @@ PERL_CALLCONV OP * Perl_ck_trunc(pTHX_ OP *o)
#define PERL_ARGS_ASSERT_CK_TRUNC \
assert(o)
-PERL_CALLCONV OP * Perl_ck_unpack(pTHX_ OP *o)
- __attribute__warn_unused_result__
- __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_CK_UNPACK \
- assert(o)
-
PERL_CALLCONV void Perl_ck_warner(pTHX_ U32 err, const char* pat, ...)
__attribute__format__(__printf__,pTHX_2,pTHX_3)
__attribute__nonnull__(pTHX_2);