diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-08-21 01:37:42 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-08-21 01:37:42 -0700 |
commit | ea5703f415b018a4574fdbed54af0a53bd0e6095 (patch) | |
tree | 64de8d4753fea26a5f97ada9d0861c1d6eae4111 /t/op/cproto.t | |
parent | f912a4747f84557c46b88101928c48622c8b8624 (diff) | |
download | perl-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 't/op/cproto.t')
-rw-r--r-- | t/op/cproto.t | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/op/cproto.t b/t/op/cproto.t index a587a316a8..2c54c0c655 100644 --- a/t/op/cproto.t +++ b/t/op/cproto.t @@ -253,7 +253,7 @@ umask (;$) undef undef unless undef unlink (@) -unpack ($;$) +unpack ($_) unshift (+@) untie (\[$@%*]) until undef |