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 /regen | |
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 'regen')
-rw-r--r-- | regen/opcodes | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/regen/opcodes b/regen/opcodes index c9c6984fbc..d6720c3cb3 100644 --- a/regen/opcodes +++ b/regen/opcodes @@ -235,7 +235,7 @@ boolkeys boolkeys ck_fun % H # Explosives and implosives. -unpack unpack ck_unpack @ S S? +unpack unpack ck_fun u@ S S? pack pack ck_fun mst@ S L split split ck_split t@ S S S join join or string ck_join mst@ S L |