Commit | Line | Data |
---|---|---|
b9d5759e | 1 | /* We need access to debugger hooks */ |
2 | #ifndef DEBUGGING | |
3 | # define DEBUGGING | |
4 | #endif | |
5 | ||
56953603 | 6 | #include "EXTERN.h" |
7 | #include "perl.h" | |
8 | #include "XSUB.h" | |
9 | ||
cea2e8a9 | 10 | extern regexp* my_regcomp (pTHX_ char* exp, char* xend, PMOP* pm); |
11 | extern I32 my_regexec (pTHX_ regexp* prog, char* stringarg, char* strend, | |
20ce7b12 | 12 | char* strbeg, I32 minend, SV* screamer, |
13 | void* data, U32 flags); | |
56953603 | 14 | |
15 | static int oldfl; | |
16 | ||
17 | #define R_DB 512 | |
18 | ||
19 | static void | |
cea2e8a9 | 20 | deinstall(pTHX) |
56953603 | 21 | { |
5c0ca799 | 22 | dTHR; |
cea2e8a9 | 23 | PL_regexecp = &Perl_regexec_flags; |
24 | PL_regcompp = &Perl_pregcomp; | |
56953603 | 25 | if (!oldfl) |
3280af22 | 26 | PL_debug &= ~R_DB; |
56953603 | 27 | } |
28 | ||
29 | static void | |
cea2e8a9 | 30 | install(pTHX) |
56953603 | 31 | { |
5c0ca799 | 32 | dTHR; |
285bbc62 | 33 | PL_colorset = 0; /* Allow reinspection of ENV. */ |
3280af22 | 34 | PL_regexecp = &my_regexec; |
35 | PL_regcompp = &my_regcomp; | |
36 | oldfl = PL_debug & R_DB; | |
37 | PL_debug |= R_DB; | |
56953603 | 38 | } |
39 | ||
40 | MODULE = re PACKAGE = re | |
41 | ||
42 | void | |
43 | install() | |
cea2e8a9 | 44 | CODE: |
45 | install(aTHX); | |
56953603 | 46 | |
47 | void | |
48 | deinstall() | |
cea2e8a9 | 49 | CODE: |
50 | deinstall(aTHX); |