From 6d5c990f28c2a18264defef032a496e2e3dfb7cd Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 4 Dec 2006 17:50:51 +0000 Subject: Better version of last patch, by Yves Orton. Actually the regexp engine structure only needs one compilation function hook. p4raw-id: //depot/perl@29459 --- regcomp.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'regcomp.h') diff --git a/regcomp.h b/regcomp.h index e1b17e57bb..1075080d95 100644 --- a/regcomp.h +++ b/regcomp.h @@ -92,6 +92,23 @@ typedef OP OP_4tree; /* Will be redefined later. */ * special test to reverse the sign of BACK pointers since the offset is * stored negative.] */ +typedef struct regexp_internal { + regexp_paren_ofs *swap; /* Swap copy of *startp / *endp */ + U32 *offsets; /* offset annotations 20001228 MJD + data about mapping the program to the + string*/ + regnode *regstclass; /* Optional startclass as identified or constructed + by the optimiser */ + struct reg_data *data; /* Additional miscellaneous data used by the program. + Used to make it easier to clone and free arbitrary + data that the regops need. Often the ARG field of + a regop is an index into this structure */ + regnode program[1]; /* Unwarranted chumminess with compiler. */ +} regexp_internal; + +#define RXi_SET(x,y) (x)->pprivate = (void*)(y) +#define RXi_GET(x) ((regexp_internal *)((x)->pprivate)) +#define RXi_GET_DECL(r,ri) regexp_internal *ri = RXi_GET(r) struct regnode_string { U8 str_len; @@ -404,7 +421,6 @@ EXTCONST U8 PL_simple[] = { EXTCONST regexp_engine PL_core_reg_engine; #else /* DOINIT */ EXTCONST regexp_engine PL_core_reg_engine = { - Perl_pregcomp, Perl_re_compile, Perl_regexec_flags, Perl_re_intuit_start, -- cgit v1.2.1