summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-06 13:35:38 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-06 13:35:38 +0000
commit9cddf794fc52f08a145668164b1e3c15c91a713f (patch)
treecd305fef6e5b696010f8f49ebd14607f32f2c901 /op.h
parentecd6c0a032c3e1cfa14b0a916a8f69fdefe81a97 (diff)
downloadperl-9cddf794fc52f08a145668164b1e3c15c91a713f.tar.gz
Clarify the intent of the code in Perl_op_clear. Under ithreads, avoid
calling sv_ivset twice. As a side effect, eliminate PM_GETRE_SAFE and PM_SETRE_SAFE, as we're doing "safe" explicitly in Perl_op_clear(). p4raw-id: //depot/perl@32867
Diffstat (limited to 'op.h')
-rw-r--r--op.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/op.h b/op.h
index 14b8e6ef24..264dd52ab8 100644
--- a/op.h
+++ b/op.h
@@ -334,13 +334,18 @@ struct pmop {
SV* const sv = PL_regex_pad[(o)->op_pmoffset]; \
sv_setiv(sv, PTR2IV(r)); \
} STMT_END
+# ifndef PERL_CORE
+/* No longer used anywhere in the core. Migrate to Devel::PPPort? */
#define PM_GETRE_SAFE(o) (PL_regex_pad ? PM_GETRE(o) : (REGEXP*)0)
#define PM_SETRE_SAFE(o,r) if (PL_regex_pad) PM_SETRE(o,r)
+# endif
#else
#define PM_GETRE(o) ((o)->op_pmregexp)
#define PM_SETRE(o,r) ((o)->op_pmregexp = (r))
+# ifndef PERL_CORE
#define PM_GETRE_SAFE PM_GETRE
#define PM_SETRE_SAFE PM_SETRE
+# endif
#endif