diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-01-04 10:13:42 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-01-04 10:30:27 +0000 |
commit | 02d9ab0a6212617fec466f93302573144e41c33a (patch) | |
tree | c130f78f810a7ef52e079e156d4a54578299f7ba | |
parent | c18cfae2d470ffd0cd27b5d8c8fcb54221803f6c (diff) | |
download | perl-02d9ab0a6212617fec466f93302573144e41c33a.tar.gz |
Remove a long-vestigial PUTBACK from the tied OPEN code in pp_send.
Commit 4592e6caefc41a75, from 1999, added the PUTBACK as part of the initial
implementation of tied OPEN. At this time, pp_open (as then was) popped the
arguments off the stack (to local variables), so the new tie code pushed them
back onto the stack, before calling the method. The stack position was
manipulated, hence the local variable sp had potentially diverged from the
global PL_stack_sp, hence the latter needed updating.
Commit a567e93b903bc984, from 2001, which added support for
open $fh, '|-', @array; refactored pp_open to avoid all stack manipulation.
Hence sp (the local variable) never changes along this code path, hence it
never needs to be written back to PL_stack_sp.
-rw-r--r-- | pp_sys.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -538,7 +538,6 @@ PP(pp_open) /* ... except handle is replaced by the object */ PUSHMARK(MARK - 1); *MARK = SvTIED_obj(MUTABLE_SV(io), mg); - PUTBACK; ENTER_with_name("call_OPEN"); call_method("OPEN", G_SCALAR); LEAVE_with_name("call_OPEN"); |