summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2016-10-19 11:14:26 +0200
committerYves Orton <demerphq@gmail.com>2016-10-19 13:28:01 +0200
commitcad211cc730aa79357eb00584d9fffa239e49d2e (patch)
tree4787f94883daeb910fe92d783f9377a7cf78c022
parent26add6d4742e30776d0eece5905625b34ce3c2a3 (diff)
downloadperl-cad211cc730aa79357eb00584d9fffa239e49d2e.tar.gz
op.c: use new SvPVCLEAR and constant string friendly macros
-rw-r--r--op.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/op.c b/op.c
index 34c9a60d07..ebbbf81a5a 100644
--- a/op.c
+++ b/op.c
@@ -8205,7 +8205,7 @@ Perl_newMYSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
CvSTASH_set(cv, PL_curstash);
*spot = cv;
}
- sv_setpvs(MUTABLE_SV(cv), ""); /* prototype is "" */
+ SvPVCLEAR(MUTABLE_SV(cv)); /* prototype is "" */
CvXSUBANY(cv).any_ptr = const_sv;
CvXSUB(cv) = const_sv_xsub;
CvCONST_on(cv);
@@ -8657,7 +8657,7 @@ Perl_newATTRSUB_x(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs,
if (cv) {
assert(!CvROOT(cv) && !CvCONST(cv));
cv_forget_slab(cv);
- sv_setpvs(MUTABLE_SV(cv), ""); /* prototype is "" */
+ SvPVCLEAR(MUTABLE_SV(cv)); /* prototype is "" */
CvXSUBANY(cv).any_ptr = const_sv;
CvXSUB(cv) = const_sv_xsub;
CvCONST_on(cv);
@@ -10162,7 +10162,7 @@ Perl_ck_fun(pTHX_ OP *o)
if (want_dollar && *name != '$')
sv_setpvs(namesv, "$");
else
- sv_setpvs(namesv, "");
+ SvPVCLEAR(namesv);
sv_catpvn(namesv, name, len);
if ( name_utf8 ) SvUTF8_on(namesv);
}