because PmopSTASH_free() is a no-op in an unthreaded perl.
p4raw-id: //depot/perl@30891
pR |OP* |ck_unpack |NN OP *o
sRn |bool |is_handle_constructor|NN const OP *o|I32 numargs
sR |I32 |is_list_assignment|NULLOK const OP *o
-s |void |forget_pmop |NN PMOP *const o|U32 flags
+# ifdef USE_ITHREADS
+so |void |forget_pmop |NN PMOP *const o|U32 flags
+# else
+so |void |forget_pmop |NN PMOP *const o
+# endif
s |void |find_and_forget_pmops |NN OP *o
s |void |cop_free |NN COP *cop
s |OP* |modkids |NULLOK OP *o|I32 type
#define ck_unpack Perl_ck_unpack
#define is_handle_constructor S_is_handle_constructor
#define is_list_assignment S_is_list_assignment
-#define forget_pmop S_forget_pmop
+#endif
+# ifdef USE_ITHREADS
+# else
+# endif
+#ifdef PERL_CORE
#define find_and_forget_pmops S_find_and_forget_pmops
#define cop_free S_cop_free
#define modkids S_modkids
#define ck_unpack(a) Perl_ck_unpack(aTHX_ a)
#define is_handle_constructor S_is_handle_constructor
#define is_list_assignment(a) S_is_list_assignment(aTHX_ a)
-#define forget_pmop(a,b) S_forget_pmop(aTHX_ a,b)
+#endif
+# ifdef USE_ITHREADS
+#ifdef PERL_CORE
+#endif
+# else
+#ifdef PERL_CORE
+#endif
+# endif
+#ifdef PERL_CORE
#define find_and_forget_pmops(a) S_find_and_forget_pmops(aTHX_ a)
#define cop_free(a) S_cop_free(aTHX_ a)
#define modkids(a,b) S_modkids(aTHX_ a,b)
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 */
}
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)) {
}
if (PL_curpm == o)
PL_curpm = NULL;
+#ifdef USE_ITHREADS
if (flags)
PmopSTASH_free(o);
+#endif
}
STATIC void
# define PmopSTASHPV(o) (PmopSTASH(o) ? HvNAME_get(PmopSTASH(o)) : NULL)
/* op_pmstashstartu.op_pmstash is not refcounted */
# define PmopSTASHPV_set(o,pv) PmopSTASH_set((o), gv_stashpv(pv,GV_ADD))
+/* Note that if this becomes non-empty, then S_forget_pmop in op.c will need
+ changing */
# define PmopSTASH_free(o)
#endif
STATIC I32 S_is_list_assignment(pTHX_ const OP *o)
__attribute__warn_unused_result__;
+# ifdef USE_ITHREADS
STATIC void S_forget_pmop(pTHX_ PMOP *const o, U32 flags)
__attribute__nonnull__(pTHX_1);
+# else
+STATIC void S_forget_pmop(pTHX_ PMOP *const o)
+ __attribute__nonnull__(pTHX_1);
+
+# endif
STATIC void S_find_and_forget_pmops(pTHX_ OP *o)
__attribute__nonnull__(pTHX_1);