summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2010-07-18 18:18:50 +0100
committerDavid Mitchell <davem@iabyn.com>2010-07-18 18:39:18 +0100
commitb3f91e9158d8a5c05627eba1c2848f35528571d2 (patch)
tree2a616b26bdf8d8d42ebdd6c8d05799853348c1e7 /op.c
parentc794ca97ff43be078aabf556aa282af208d9c38c (diff)
downloadperl-b3f91e9158d8a5c05627eba1c2848f35528571d2.tar.gz
add CvGV_set() macro and make CvGV() rvalue only
Now that CvGV can sometimes be reference counted, stop people from directly assigning to it (by using CvGV as an lvalue), and instead force them to use CvGV_set()
Diffstat (limited to 'op.c')
-rw-r--r--op.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/op.c b/op.c
index 3ae15cb874..276e10093e 100644
--- a/op.c
+++ b/op.c
@@ -5459,7 +5459,7 @@ Perl_cv_undef(pTHX_ CV *cv)
LEAVE;
}
SvPOK_off(MUTABLE_SV(cv)); /* forget prototype */
- cvgv_set(cv, NULL);
+ CvGV_set(cv, NULL);
pad_undef(cv);
@@ -5872,7 +5872,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
}
}
if (!CvGV(cv)) {
- cvgv_set(cv, gv);
+ CvGV_set(cv, gv);
CvFILE_set_from_cop(cv, PL_curcop);
CvSTASH(cv) = PL_curstash;
if (PL_curstash)
@@ -6236,7 +6236,7 @@ Perl_newXS(pTHX_ const char *name, XSUBADDR_t subaddr, const char *filename)
}
if (!name)
CvANON_on(cv);
- cvgv_set(cv, gv);
+ CvGV_set(cv, gv);
(void)gv_fetchfile(filename);
CvFILE(cv) = (char *)filename; /* NOTE: not copied, as it is expected to be
an external constant string */
@@ -6285,7 +6285,7 @@ Perl_newFORM(pTHX_ I32 floor, OP *o, OP *block)
}
cv = PL_compcv;
GvFORM(gv) = cv;
- cvgv_set(cv, gv);
+ CvGV_set(cv, gv);
CvFILE_set_from_cop(cv, PL_curcop);