|NN char* strend|NN char* strbeg|I32 minend \
|NN SV* screamer|U32 nosave
Ap |void |pregfree |NULLOK struct regexp* r
+#if defined(USE_ITHREADS)
Ap |regexp*|regdupe |NN const regexp* r|NN CLONE_PARAMS* param
+#endif
Ap |regexp*|pregcomp |NN char* exp|NN char* xend|NN PMOP* pm
Ap |char* |re_intuit_start|NN regexp* prog|NULLOK SV* sv|NN char* strpos \
|NN char* strend|U32 flags \
#define regclass_swash Perl_regclass_swash
#define pregexec Perl_pregexec
#define pregfree Perl_pregfree
+#if defined(USE_ITHREADS)
#define regdupe Perl_regdupe
+#endif
#define pregcomp Perl_pregcomp
#define re_intuit_start Perl_re_intuit_start
#define re_intuit_string Perl_re_intuit_string
#define regclass_swash(a,b,c,d,e) Perl_regclass_swash(aTHX_ a,b,c,d,e)
#define pregexec(a,b,c,d,e,f,g) Perl_pregexec(aTHX_ a,b,c,d,e,f,g)
#define pregfree(a) Perl_pregfree(aTHX_ a)
+#if defined(USE_ITHREADS)
#define regdupe(a,b) Perl_regdupe(aTHX_ a,b)
+#endif
#define pregcomp(a,b,c) Perl_pregcomp(aTHX_ a,b,c)
#define re_intuit_start(a,b,c,d,e,f) Perl_re_intuit_start(aTHX_ a,b,c,d,e,f)
#define re_intuit_string(a) Perl_re_intuit_string(aTHX_ a)
struct re_scream_pos_data_s *data);
SV* (*re_intuit_string) (pTHX_ regexp *prog);
void (*regfree) (pTHX_ struct regexp* r);
+#if defined(USE_ITHREADS)
regexp* (*regdupe) (pTHX_ regexp *r, CLONE_PARAMS *param);
+#endif
};
struct regexp_engine engines[] = {
{ Perl_pregcomp, Perl_regexec_flags, Perl_re_intuit_start,
- Perl_re_intuit_string, Perl_pregfree, Perl_regdupe },
+ Perl_re_intuit_string, Perl_pregfree
+#if defined(USE_ITHREADS)
+ , Perl_regdupe
+#endif
+ },
{ my_regcomp, my_regexec, my_re_intuit_start, my_re_intuit_string,
- my_regfree, my_regdupe }
+ my_regfree
+#if defined(USE_ITHREADS)
+ , my_regdupe
+#endif
+ }
};
#define MY_CXT_KEY "re::_guts" XS_VERSION
PL_regint_start = engines[new_state].re_intuit_start;
PL_regint_string = engines[new_state].re_intuit_string;
PL_regfree = engines[new_state].regfree;
+#if defined(USE_ITHREADS)
PL_regdupe = engines[new_state].regdupe;
+#endif
if (new_state & NEEDS_DEBUGGING) {
PL_colorset = 0; /* Allow reinspection of ENV. */
Perl_sharedsv_thrcnt_inc
Perl_sharedsv_unlock
Perl_stashpv_hvname_match
+ Perl_regdupe
)];
}
__attribute__nonnull__(pTHX_6);
PERL_CALLCONV void Perl_pregfree(pTHX_ struct regexp* r);
+#if defined(USE_ITHREADS)
PERL_CALLCONV regexp* Perl_regdupe(pTHX_ const regexp* r, CLONE_PARAMS* param)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
+#endif
PERL_CALLCONV regexp* Perl_pregcomp(pTHX_ char* exp, char* xend, PMOP* pm)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
See pregfree() above if you change anything here.
*/
+#if defined(USE_ITHREADS)
regexp *
Perl_regdupe(pTHX_ const regexp *r, CLONE_PARAMS *param)
{
-#if defined(USE_ITHREADS)
dVAR;
REGEXP *ret;
int i, len, npar;
ptr_table_store(PL_ptr_table, r, ret);
return ret;
-#else
return NULL;
-#endif
}
+#endif
#ifndef PERL_IN_XSUB_RE
/*
PERLVARI(Tregfree, regfree_t, MEMBER_TO_FPTR(Perl_pregfree))
/* Pointer to REx free()er */
+#if defined(USE_ITHREADS)
PERLVARI(Tregdupe, regdupe_t, MEMBER_TO_FPTR(Perl_regdupe))
/* Pointer to REx dupe()er */
+#endif
PERLVARI(Treginterp_cnt,int, 0) /* Whether "Regexp" was interpolated. */