From cfc1e951d98ba2b9a0e066aba9aadba4cd919eec Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Sun, 18 Jul 2010 15:07:08 +0100 Subject: add CVf_CVGV_RC flag after the recent commit 803f274831f937654d48f8cf0468521cbf8f5dff, the CvGV field is sometimes reference counted. Since it was intended that the reference counting would happen only for anonymous CVs, the CVf_ANON flag was co-opted to indicate whether RC was being used. This is not entirely robust; for example, sub __ANON__ {} is a non-anon sub which points to the same GV used by anon subs, which while itself doesn't directly break things, shows that the potential for breakage is there. So add a separate flag just to indicate the reference count status of the CvGV field. --- op.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'op.c') diff --git a/op.c b/op.c index e5f9604521..3ae15cb874 100644 --- a/op.c +++ b/op.c @@ -5476,9 +5476,9 @@ Perl_cv_undef(pTHX_ CV *cv) if (CvISXSUB(cv) && CvXSUB(cv)) { CvXSUB(cv) = NULL; } - /* delete all flags except WEAKOUTSIDE and ANON, which indicate the + /* delete all flags except WEAKOUTSIDE and CVGV_RC, which indicate the * ref status of CvOUTSIDE and CvGV */ - CvFLAGS(cv) &= (CVf_WEAKOUTSIDE|CVf_ANON); + CvFLAGS(cv) &= (CVf_WEAKOUTSIDE|CVf_CVGV_RC); } void -- cgit v1.2.1