This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Unresolved symbol in ext/re/re.xs
[perl5.git] / ext / re / re.xs
CommitLineData
b9d5759e
AD
1/* We need access to debugger hooks */
2#ifndef DEBUGGING
3# define DEBUGGING
5371795a 4# define WAS_NOT_DEBUGGING
b9d5759e
AD
5#endif
6
c5be433b 7#define PERL_NO_GET_CONTEXT
56953603
IZ
8#include "EXTERN.h"
9#include "perl.h"
10#include "XSUB.h"
11
5371795a
GA
12#ifdef WAS_NOT_DEBUGGING
13void Perl_deb(pTHX_ const char* pat, ...) { }
14#endif
15
cea2e8a9
GS
16extern regexp* my_regcomp (pTHX_ char* exp, char* xend, PMOP* pm);
17extern I32 my_regexec (pTHX_ regexp* prog, char* stringarg, char* strend,
20ce7b12
GS
18 char* strbeg, I32 minend, SV* screamer,
19 void* data, U32 flags);
f722798b
IZ
20extern void my_regfree (pTHX_ struct regexp* r);
21extern char* my_re_intuit_start (pTHX_ regexp *prog, SV *sv, char *strpos,
22 char *strend, U32 flags,
23 struct re_scream_pos_data_s *data);
24extern SV* my_re_intuit_string (pTHX_ regexp *prog);
56953603
IZ
25
26static int oldfl;
27
56953603 28static void
cea2e8a9 29deinstall(pTHX)
56953603 30{
0b94c7bb
GS
31 PL_regexecp = Perl_regexec_flags;
32 PL_regcompp = Perl_pregcomp;
33 PL_regint_start = Perl_re_intuit_start;
34 PL_regint_string = Perl_re_intuit_string;
35 PL_regfree = Perl_pregfree;
f722798b 36
56953603 37 if (!oldfl)
aea4f609 38 PL_debug &= ~DEBUG_r_FLAG;
56953603
IZ
39}
40
41static void
cea2e8a9 42install(pTHX)
56953603 43{
285bbc62 44 PL_colorset = 0; /* Allow reinspection of ENV. */
3280af22
NIS
45 PL_regexecp = &my_regexec;
46 PL_regcompp = &my_regcomp;
f722798b
IZ
47 PL_regint_start = &my_re_intuit_start;
48 PL_regint_string = &my_re_intuit_string;
49 PL_regfree = &my_regfree;
aea4f609 50 oldfl = PL_debug & DEBUG_r_FLAG;
d8981068 51 PL_debug |= DEBUG_r_FLAG;
56953603
IZ
52}
53
54MODULE = re PACKAGE = re
55
56void
57install()
cea2e8a9
GS
58 CODE:
59 install(aTHX);
56953603
IZ
60
61void
62deinstall()
cea2e8a9
GS
63 CODE:
64 deinstall(aTHX);