diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-09-26 22:29:09 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-09-26 22:29:09 +0000 |
commit | a3c0e9caa94eb215eb66e54d6286c77ccf441f01 (patch) | |
tree | 6b3f99fb79ffb54e76b7cda0e388f65417e5c1c2 /ext | |
parent | 03363afd3c2c023b9096c021741ecc63bc0de7dd (diff) | |
download | perl-a3c0e9caa94eb215eb66e54d6286c77ccf441f01.tar.gz |
Make Perl_regdupe only exist for threaded perls.
p4raw-id: //depot/perl@28893
Diffstat (limited to 'ext')
-rw-r--r-- | ext/re/re.xs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ext/re/re.xs b/ext/re/re.xs index 7fad14642f..3433a0fd7e 100644 --- a/ext/re/re.xs +++ b/ext/re/re.xs @@ -36,14 +36,24 @@ struct regexp_engine { 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 @@ -76,7 +86,9 @@ install(pTHX_ unsigned int new_state) 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. */ |