summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/regcomp.c b/regcomp.c
index 9c9fc1415f..d2717e1792 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -169,11 +169,7 @@ static scan_data_t zero_scan_data = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
#define CHR_SVLEN(sv) (UTF ? sv_len_utf8(sv) : SvCUR(sv))
#define CHR_DIST(a,b) (UTF ? utf8_distance(a,b) : a - b)
-STATIC void
-S_clear_re(pTHX_ void *r)
-{
- ReREFCNT_dec((regexp *)r);
-}
+static void clear_re(pTHXo_ void *r);
STATIC void
S_scan_commit(pTHX_ scan_data_t *data)
@@ -3390,3 +3386,17 @@ Perl_save_re_context(pTHX)
SAVEPPTR(PL_reg_starttry); /* from regexec.c */
#endif
}
+
+#ifdef PERL_OBJECT
+#define NO_XSLOCKS
+#include "XSUB.h"
+#undef this
+#define this pPerl
+#endif
+
+static void
+clear_re(pTHXo_ void *r)
+{
+ ReREFCNT_dec((regexp *)r);
+}
+