Convert tied PRINTF to using S_tied_handle_method()
authorNicholas Clark <nick@ccl4.org>
Tue, 4 Jan 2011 12:23:30 +0000 (12:23 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 4 Jan 2011 15:31:18 +0000 (15:31 +0000)
pp_sys.c

index d042f59..e645f35 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1511,13 +1511,9 @@ PP(pp_prtf)
                Move(MARK, MARK + 1, (SP - MARK) + 1, SV*);
                ++SP;
            }
-           PUSHMARK(MARK - 1);
-           *MARK = SvTIED_obj(MUTABLE_SV(io), mg);
-           PUTBACK;
-           ENTER;
-           call_method("PRINTF", G_SCALAR);
-           LEAVE;
-           return NORMAL;
+           return S_tied_handle_method(aTHX_ "PRINTF", mark - 1, io, mg,
+                                       G_SCALAR | ARGUMENTS_ON_STACK
+                                       | (sp - mark) << TIED_HANDLE_ARGC_SHIFT);
        }
     }