[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
[PATCH] Code refs aren't lockable
Remove the check for code refs in pp_lock.
For debuggin, assert that the ref is not a code ref
(per Dave Mitchell's suggestion).
From 250e8af46ccaa05f4107ef6e540e6fead412f0b1 Mon Sep 17 00:00:00 2001
From: Jerry D. Hedden <jdhedden@cpan.org>
Date: Wed, 21 Jan 2009 11:03:38 -0500
Subject: [PATCH] Code refs aren't lockable
Remove the check for code refs in pp_lock.
For debuggin, assert that the ref is not a code ref
(per Dave Mitchell's suggestion).
---
pp.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
mode change 100644 => 100755 pp.c
diff --git a/pp.c b/pp.c
old mode 100644
new mode 100755
index aacb789..9cedc3f
--- a/pp.c
+++ b/pp.c
@@ -5062,9 +5062,9 @@ PP(pp_lock)
dSP;
dTOPss;
SV *retsv = sv;
+ assert(SvTYPE(retsv) != SVt_PVCV);
SvLOCK(sv);
- if (SvTYPE(retsv) == SVt_PVAV || SvTYPE(retsv) == SVt_PVHV
- || SvTYPE(retsv) == SVt_PVCV) {
+ if (SvTYPE(retsv) == SVt_PVAV || SvTYPE(retsv) == SVt_PVHV) {
retsv = refto(retsv);
}
SETs(retsv);
--
1.6.0.4
- Follow-Ups from:
-
Rafael Garcia-Suarez <rgarciasuarez@gmail.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]