diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-12-21 18:34:03 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-12-21 18:34:03 +0000 |
commit | f2c0649b2032ef5d607fe4e0874cdfa49e41eaf2 (patch) | |
tree | 4c5b8697ac2de0d25db9f559c614890278becfc3 /pp.c | |
parent | 6c16d61e47523e90f35cd004e44bb2f055ede7c4 (diff) | |
download | perl-f2c0649b2032ef5d607fe4e0874cdfa49e41eaf2.tar.gz |
The lref argument of sv_2cv is actually passed onwards to gv_fetchsv,
so it is a bitmap of flag bits rather than simple TRUE/FALSE.
p4raw-id: //depot/perl@26434
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -340,7 +340,8 @@ PP(pp_rv2cv) /* We usually try to add a non-existent subroutine in case of AUTOLOAD. */ /* (But not in defined().) */ - CV *cv = sv_2cv(TOPs, &stash, &gv, !(PL_op->op_flags & OPf_SPECIAL)); + CV *cv = sv_2cv(TOPs, &stash, &gv, + (PL_op->op_flags & OPf_SPECIAL) ? 0 : GV_ADD); if (cv) { if (CvCLONE(cv)) cv = (CV*)sv_2mortal((SV*)cv_clone(cv)); @@ -416,7 +417,7 @@ PP(pp_prototype) } } } - cv = sv_2cv(TOPs, &stash, &gv, FALSE); + cv = sv_2cv(TOPs, &stash, &gv, 0); if (cv && SvPOK(cv)) ret = sv_2mortal(newSVpvn(SvPVX_const(cv), SvCUR(cv))); set: @@ -3809,7 +3810,7 @@ PP(pp_exists) if (PL_op->op_private & OPpEXISTS_SUB) { GV *gv; SV * const sv = POPs; - CV * const cv = sv_2cv(sv, &hv, &gv, FALSE); + CV * const cv = sv_2cv(sv, &hv, &gv, 0); if (cv) RETPUSHYES; if (gv && isGV(gv) && GvCV(gv) && !GvCVGEN(gv)) |