summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-04-10 14:49:31 +0000
committerNicholas Clark <nick@ccl4.org>2007-04-10 14:49:31 +0000
commitc4bd3ae5119ffa374bc2a939fae6f0e624cc7804 (patch)
tree07d2f4eb851148631155acca8aa7b41177233b13 /op.c
parent1cdf7faf9fb9e7feb64bb63a4448c8361e406417 (diff)
downloadperl-c4bd3ae5119ffa374bc2a939fae6f0e624cc7804.tar.gz
S_forget_pmop() only needs a flags argument for the ithreads case,
because PmopSTASH_free() is a no-op in an unthreaded perl. p4raw-id: //depot/perl@30891
Diffstat (limited to 'op.c')
-rw-r--r--op.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/op.c b/op.c
index efe5611a62..e1b5ec5763 100644
--- a/op.c
+++ b/op.c
@@ -407,6 +407,11 @@ S_op_destroy(pTHX_ OP *o)
FreeOp(o);
}
+#ifdef USE_ITHREADS
+# define forget_pmop(a,b) S_forget_pmop(aTHX_ a,b)
+#else
+# define forget_pmop(a,b) S_forget_pmop(aTHX_ a)
+#endif
/* Destructor */
@@ -636,7 +641,11 @@ S_cop_free(pTHX_ COP* cop)
}
STATIC void
-S_forget_pmop(pTHX_ PMOP *const o, U32 flags)
+S_forget_pmop(pTHX_ PMOP *const o
+#ifdef USE_ITHREADS
+ , U32 flags
+#endif
+ )
{
HV * const pmstash = PmopSTASH(o);
if (pmstash && !SvIS_FREED(pmstash)) {
@@ -665,8 +674,10 @@ S_forget_pmop(pTHX_ PMOP *const o, U32 flags)
}
if (PL_curpm == o)
PL_curpm = NULL;
+#ifdef USE_ITHREADS
if (flags)
PmopSTASH_free(o);
+#endif
}
STATIC void