diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1999-06-09 14:14:27 -0400 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-06 09:05:02 +0000 |
commit | f722798beaa437498e1f879b01996be44f2fdc1a (patch) | |
tree | 89f77d510121aa9a3b67c8d66e7f9c37783b143e /ext | |
parent | 572bbb43c768e4239ddeb3245621277ab450fe70 (diff) | |
download | perl-f722798beaa437498e1f879b01996be44f2fdc1a.tar.gz |
applied slightly tweaked version of suggested patch for
improved RE API
Message-Id: <199906092214.SAA14126@monk.mps.ohio-state.edu>
Subject: [PATCH 5.005_57] REx engine rehash
p4raw-id: //depot/perl@3606
Diffstat (limited to 'ext')
-rw-r--r-- | ext/re/Makefile.PL | 2 | ||||
-rw-r--r-- | ext/re/re.xs | 16 |
2 files changed, 15 insertions, 3 deletions
diff --git a/ext/re/Makefile.PL b/ext/re/Makefile.PL index 040b085f4f..bd0f1f741c 100644 --- a/ext/re/Makefile.PL +++ b/ext/re/Makefile.PL @@ -5,7 +5,7 @@ WriteMakefile( MAN3PODS => {}, # Pods will be built by installman. XSPROTOARG => '-noprototypes', OBJECT => 're_exec$(OBJ_EXT) re_comp$(OBJ_EXT) re$(OBJ_EXT)', - DEFINE => '-DPERL_EXT_RE_BUILD', + DEFINE => '-DPERL_EXT_RE_BUILD -DPERL_EXT_RE_DEBUG', clean => { FILES => '*$(OBJ_EXT) *.c ../../lib/re.pm' }, ); diff --git a/ext/re/re.xs b/ext/re/re.xs index b49a110377..10e44f76de 100644 --- a/ext/re/re.xs +++ b/ext/re/re.xs @@ -11,6 +11,11 @@ extern regexp* my_regcomp (pTHX_ char* exp, char* xend, PMOP* pm); extern I32 my_regexec (pTHX_ regexp* prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, void* data, U32 flags); +extern void my_regfree (pTHX_ struct regexp* r); +extern char* my_re_intuit_start (pTHX_ regexp *prog, SV *sv, char *strpos, + char *strend, U32 flags, + struct re_scream_pos_data_s *data); +extern SV* my_re_intuit_string (pTHX_ regexp *prog); static int oldfl; @@ -20,8 +25,12 @@ static void deinstall(pTHX) { dTHR; - PL_regexecp = &Perl_regexec_flags; - PL_regcompp = &Perl_pregcomp; + PL_regexecp = FUNC_NAME_TO_PTR(Perl_regexec_flags); + PL_regcompp = FUNC_NAME_TO_PTR(Perl_pregcomp); + PL_regint_start = FUNC_NAME_TO_PTR(Perl_re_intuit_start); + PL_regint_string = FUNC_NAME_TO_PTR(Perl_re_intuit_string); + PL_regfree = FUNC_NAME_TO_PTR(Perl_pregfree); + if (!oldfl) PL_debug &= ~R_DB; } @@ -33,6 +42,9 @@ install(pTHX) PL_colorset = 0; /* Allow reinspection of ENV. */ PL_regexecp = &my_regexec; PL_regcompp = &my_regcomp; + PL_regint_start = &my_re_intuit_start; + PL_regint_string = &my_re_intuit_string; + PL_regfree = &my_regfree; oldfl = PL_debug & R_DB; PL_debug |= R_DB; } |