diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-09-01 10:56:47 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-09-01 10:56:47 +0100 |
commit | 7b1903740d907382fa6f406bd7ab1262921746c8 (patch) | |
tree | ecf3b2209495133e8daa99369b56715b436ea931 /pp_sys.c | |
parent | a77ac40c5b8111e15c16279ce494e3aafde2b18e (diff) | |
download | perl-7b1903740d907382fa6f406bd7ab1262921746c8.tar.gz |
Move the call to Perl_cv_clone() into S_doform(), from its two callers.
This reduces code duplication slightly, and reduces the object code size.
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1275,6 +1275,9 @@ S_doform(pTHX_ CV *cv, GV *gv, OP *retop) PERL_ARGS_ASSERT_DOFORM; + if (cv && CvCLONE(cv)) + cv = MUTABLE_CV(sv_2mortal(MUTABLE_SV(cv_clone(cv)))); + ENTER; SAVETMPS; @@ -1330,9 +1333,6 @@ PP(pp_enterwrite) not_a_format_reference: DIE(aTHX_ "Not a format reference"); } - if (CvCLONE(cv)) - cv = MUTABLE_CV(sv_2mortal(MUTABLE_SV(cv_clone(cv)))); - IoFLAGS(io) &= ~IOf_DIDTOP; return doform(cv,gv,PL_op->op_next); } @@ -1421,8 +1421,6 @@ PP(pp_leavewrite) else DIE(aTHX_ "Undefined top format called"); } - if (cv && CvCLONE(cv)) - cv = MUTABLE_CV(sv_2mortal(MUTABLE_SV(cv_clone(cv)))); return doform(cv, gv, PL_op); } |