summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-01-04 09:48:27 +0000
committerNicholas Clark <nick@ccl4.org>2011-01-04 10:30:27 +0000
commitc18cfae2d470ffd0cd27b5d8c8fcb54221803f6c (patch)
tree1589466a76a3207013fdb6a41040fb7db13dea38
parent0b5e625bc99f5cb78697faf03b297b6cacadf60b (diff)
downloadperl-c18cfae2d470ffd0cd27b5d8c8fcb54221803f6c.tar.gz
Converge the implementation of tied OPEN with PRINTF, READ and WRITE.
Consistency will make it easier to refactor.
-rw-r--r--pp_sys.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 262fefe1e1..cf6263adf1 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -536,8 +536,8 @@ PP(pp_open)
if (mg) {
/* Method's args are same as ours ... */
/* ... except handle is replaced by the object */
- *MARK-- = SvTIED_obj(MUTABLE_SV(io), mg);
- PUSHMARK(MARK);
+ PUSHMARK(MARK - 1);
+ *MARK = SvTIED_obj(MUTABLE_SV(io), mg);
PUTBACK;
ENTER_with_name("call_OPEN");
call_method("OPEN", G_SCALAR);