diff options
author | Steffen Mueller <smueller@cpan.org> | 2012-12-09 17:26:13 +0100 |
---|---|---|
committer | Steffen Mueller <smueller@cpan.org> | 2012-12-09 22:56:49 +0100 |
commit | fc2b2dcaa051537d8d92ccf366f291581b26024b (patch) | |
tree | 2fcf8497e9c69b2014c6ad2296dcdfbcd274fed6 /pad.c | |
parent | 31c7f561ae1fcf5096c82b0ce7d0ab0dc6899204 (diff) | |
download | perl-fc2b2dcaa051537d8d92ccf366f291581b26024b.tar.gz |
Convert some SvREFCNT_dec's to SvREFCNT_dec_NN's for efficiency
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -196,7 +196,7 @@ sv_eq_pvn_flags(pTHX_ const SV *sv, const char* pv, const STRLEN pvlen, const U3 sv_recode_to_utf8(svrecode, PL_encoding); pv1 = SvPV_const(svrecode, cur1); } - SvREFCNT_dec(svrecode); + SvREFCNT_dec_NN(svrecode); } if (flags & SVf_UTF8) return (bytes_cmp_utf8( @@ -427,7 +427,7 @@ Perl_cv_undef(pTHX_ CV *cv) if (SvREFCNT(comppad) < 2) { /* allow for /(?{ sub{} })/ */ curpad[ix] = NULL; - SvREFCNT_dec(innercv); + SvREFCNT_dec_NN(innercv); inner_rc--; } @@ -457,7 +457,7 @@ Perl_cv_undef(pTHX_ CV *cv) PL_comppad = NULL; PL_curpad = NULL; } - SvREFCNT_dec(sv); + SvREFCNT_dec_NN(sv); } } { @@ -830,7 +830,7 @@ Perl_pad_add_anon(pTHX_ CV* func, I32 optype) if (CvOUTSIDE(func) && SvTYPE(func) == SVt_PVCV) { assert(!CvWEAKOUTSIDE(func)); CvWEAKOUTSIDE_on(func); - SvREFCNT_dec(CvOUTSIDE(func)); + SvREFCNT_dec_NN(CvOUTSIDE(func)); } return ix; } @@ -2164,7 +2164,7 @@ S_cv_clone(pTHX_ CV *proto, CV *cv, CV *outside) */ SV* const const_sv = op_const_sv(CvSTART(cv), cv); if (const_sv) { - SvREFCNT_dec(cv); + SvREFCNT_dec_NN(cv); /* For this calling case, op_const_sv returns a *copy*, which we donate to newCONSTSUB. Yes, this is ugly, and should be killed. Need to fix how lib/constant.pm works to eliminate this. */ |