symbols" section.
Minor tweaks to make it possible to use the code unchanged with 5.8.x
p4raw-id: //depot/perl@27938
ext/POSIX/typemap POSIX extension interface types
ext/re/hints/mpeix.pl Hints for re for named architecture
ext/re/Makefile.PL re extension makefile writer
+ext/re/re_top.h re extension symbol hiding header
+ext/re/re_comp.h re extension wrapper for regcomp.h
ext/re/re.pm re extension Perl module
ext/re/re.xs re extension external subroutines
ext/re/t/re.t see if re pragma works
--- /dev/null
+/* For blead, this file needs to do nothing other than pull in the regular
+ regcomp.h. For the 5.8.x re module it has to do more.
+ But doing it this way keeps regcomp.c and regexec.c clean.
+*/
+
+#include "regcomp.h"
+
--- /dev/null
+/* need to replace pregcomp et al, so enable that */
+#ifndef PERL_IN_XSUB_RE
+# define PERL_IN_XSUB_RE
+#endif
+/* need access to debugger hooks */
+#if defined(PERL_EXT_RE_DEBUG) && !defined(DEBUGGING)
+# define DEBUGGING
+#endif
+
+/* We *really* need to overwrite these symbols: */
+#define Perl_regexec_flags my_regexec
+#define Perl_regdump my_regdump
+#define Perl_regprop my_regprop
+#define Perl_re_intuit_start my_re_intuit_start
+#define Perl_pregcomp my_regcomp
+#define Perl_pregfree my_regfree
+#define Perl_re_intuit_string my_re_intuit_string
+
+#define PERL_NO_GET_CONTEXT
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ *
+ * ex: set ts=8 sts=4 sw=4 noet:
+ */
*/
#ifdef PERL_EXT_RE_BUILD
-/* need to replace pregcomp et al, so enable that */
-# ifndef PERL_IN_XSUB_RE
-# define PERL_IN_XSUB_RE
-# endif
-/* need access to debugger hooks */
-# if defined(PERL_EXT_RE_DEBUG) && !defined(DEBUGGING)
-# define DEBUGGING
-# endif
-#endif
-
-#ifdef PERL_IN_XSUB_RE
-/* We *really* need to overwrite these symbols: */
-# define Perl_pregcomp my_regcomp
-# define Perl_regdump my_regdump
-# define Perl_regprop my_regprop
-# define Perl_pregfree my_regfree
-# define Perl_re_intuit_string my_re_intuit_string
-/* *These* symbols are masked to allow static link. */
-
-# define PERL_NO_GET_CONTEXT
+#include "re_top.h"
#endif
/*
#endif
#define REG_COMP_C
-#include "regcomp.h"
+#ifdef PERL_IN_XSUB_RE
+# include "re_comp.h"
+#else
+# include "regcomp.h"
+#endif
#ifdef op
#undef op
FAIL("Eval-group not allowed at runtime, use re 'eval'");
if (PL_tainting && PL_tainted)
FAIL("Eval-group in insecure regular expression");
+#if PERL_VERSION > 8
if (IN_PERL_COMPILETIME)
PL_cv_has_eval = 1;
+#endif
}
nextchar(pRExC_state);
*/
#ifdef PERL_EXT_RE_BUILD
-/* need to replace pregcomp et al, so enable that */
-# ifndef PERL_IN_XSUB_RE
-# define PERL_IN_XSUB_RE
-# endif
-/* need access to debugger hooks */
-# if defined(PERL_EXT_RE_DEBUG) && !defined(DEBUGGING)
-# define DEBUGGING
-# endif
-#endif
-
-#ifdef PERL_IN_XSUB_RE
-/* We *really* need to overwrite these symbols: */
-# define Perl_regexec_flags my_regexec
-# define Perl_regdump my_regdump
-# define Perl_regprop my_regprop
-# define Perl_re_intuit_start my_re_intuit_start
-
-# define PERL_NO_GET_CONTEXT
+#include "re_top.h"
#endif
/*
#define PERL_IN_REGEXEC_C
#include "perl.h"
-#include "regcomp.h"
+#ifdef PERL_IN_XSUB_RE
+# include "re_comp.h"
+#else
+# include "regcomp.h"
+#endif
#define RF_tainted 1 /* tainted information used? */
#define RF_warned 2 /* warned about big count? */
STATIC regmatch_state *
S_push_slab(pTHX)
{
+#if PERL_VERSION < 9
+ dMY_CXT;
+#endif
regmatch_slab *s = PL_regmatch_slab->next;
if (!s) {
Newx(s, 1, regmatch_slab);
STATIC I32 /* 0 failure, 1 success */
S_regmatch(pTHX_ const regmatch_info *reginfo, regnode *prog)
{
+#if PERL_VERSION < 9
+ dMY_CXT;
+#endif
dVAR;
register const bool do_utf8 = PL_reg_match_utf8;
const U32 uniflags = UTF8_ALLOW_DEFAULT;