added suggested patch (via PM), tweaked to implicitly specify -DDEBUGGING
[p5sagit/p5-mst-13.2.git] / ext / re / re.xs
CommitLineData
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
10extern regexp* my_regcomp _((char* exp, char* xend, PMOP* pm));
11extern I32 my_regexec _((regexp* prog, char* stringarg, char* strend,
12 char* strbeg, I32 minend, SV* screamer,
13 void* data, U32 flags));
14
15static int oldfl;
16
17#define R_DB 512
18
19static void
20deinstall(void)
21{
5c0ca799 22 dTHR;
56953603 23 regexecp = &regexec_flags;
24 regcompp = &pregcomp;
25 if (!oldfl)
26 debug &= ~R_DB;
27}
28
29static void
30install(void)
31{
5c0ca799 32 dTHR;
56953603 33 regexecp = &my_regexec;
34 regcompp = &my_regcomp;
35 oldfl = debug & R_DB;
36 debug |= R_DB;
37}
38
39MODULE = re PACKAGE = re
40
41void
42install()
43
44void
45deinstall()