EXp |SV*|reg_named_buff_get |NN const REGEXP * const rx|NN SV* namesv|U32 flags
EXp |SV*|reg_numbered_buff_get|NN const REGEXP * const rx|I32 paren|NULLOK SV* usesv
+EXp |SV*|reg_qr_pkg|NN const REGEXP * const rx
Ep |void |regprop |NULLOK const regexp *prog|NN SV* sv|NN const regnode* o
Ap |void |repeatcpy |NN char* to|NN const char* from|I32 len|I32 count
#if defined(PERL_CORE) || defined(PERL_EXT)
#define reg_named_buff_get Perl_reg_named_buff_get
#define reg_numbered_buff_get Perl_reg_numbered_buff_get
+#define reg_qr_pkg Perl_reg_qr_pkg
#endif
#if defined(PERL_CORE) || defined(PERL_EXT)
#define regprop Perl_regprop
#if defined(PERL_CORE) || defined(PERL_EXT)
#define reg_named_buff_get(a,b,c) Perl_reg_named_buff_get(aTHX_ a,b,c)
#define reg_numbered_buff_get(a,b,c) Perl_reg_numbered_buff_get(aTHX_ a,b,c)
+#define reg_qr_pkg(a) Perl_reg_qr_pkg(aTHX_ a)
#endif
#if defined(PERL_CORE) || defined(PERL_EXT)
#define regprop(a,b,c) Perl_regprop(aTHX_ a,b,c)
extern void my_regfree (pTHX_ struct regexp* r);
extern SV* my_reg_numbered_buff_get(pTHX_ const REGEXP * const rx, I32 paren, SV* usesv);
extern SV* my_reg_named_buff_get(pTHX_ const REGEXP * const rx, SV* namesv, U32 flags);
+extern SV* my_reg_qr_pkg(pTHX_ const REGEXP * const rx);
#if defined(USE_ITHREADS)
extern void* my_regdupe (pTHX_ const regexp *r, CLONE_PARAMS *param);
#endif
my_regfree,
my_reg_numbered_buff_get,
my_reg_named_buff_get,
+ my_reg_qr_pkg,
#if defined(USE_ITHREADS)
my_regdupe
#endif
#define Perl_regdupe_internal my_regdupe
#define Perl_reg_numbered_buff_get my_reg_numbered_buff_get
#define Perl_reg_named_buff_get my_reg_named_buff_get
+#define Perl_reg_qr_pkg my_reg_qr_pkg
#define PERL_NO_GET_CONTEXT
Perl_regnext
Perl_reg_named_buff_get
Perl_reg_numbered_buff_get
+Perl_reg_qr_pkg
Perl_repeatcpy
Perl_rninstr
Perl_rsignal
#define CALLREG_NAMEDBUF(rx,name,flags) \
CALL_FPTR((rx)->engine->named_buff_get)(aTHX_ (rx),(name),(flags))
+#define CALLREG_QRPKG(rx) \
+ CALL_FPTR((rx)->engine->qr_pkg)(aTHX_ (rx))
#if defined(USE_ITHREADS)
#define CALLREGDUPE(prog,param) \
{
dVAR; dSP;
register PMOP * const pm = cPMOP;
+ REGEXP * rx = PM_GETRE(pm);
+ SV * const pkg = CALLREG_QRPKG(rx);
SV * const rv = sv_newmortal();
- SV * const sv = newSVrv(rv, "Regexp");
- regexp *re = PM_GETRE(pm);
- if (re->extflags & RXf_TAINTED)
+ SV * const sv = newSVrv(rv, SvPV_nolen(pkg));
+ if (rx->extflags & RXf_TAINTED)
SvTAINTED_on(rv);
- sv_magic(sv,(SV*)ReREFCNT_inc(re), PERL_MAGIC_qr,0,0);
+ sv_magic(sv,(SV*)ReREFCNT_inc(rx), PERL_MAGIC_qr,0,0);
XPUSHs(rv);
RETURN;
}
PERL_CALLCONV SV* Perl_reg_numbered_buff_get(pTHX_ const REGEXP * const rx, I32 paren, SV* usesv)
__attribute__nonnull__(pTHX_1);
+PERL_CALLCONV SV* Perl_reg_qr_pkg(pTHX_ const REGEXP * const rx)
+ __attribute__nonnull__(pTHX_1);
+
PERL_CALLCONV void Perl_regprop(pTHX_ const regexp *prog, SV* sv, const regnode* o)
__attribute__nonnull__(pTHX_2)
return sv;
}
+SV*
+Perl_reg_qr_pkg(pTHX_ const REGEXP * const rx)
+{
+ PERL_UNUSED_ARG(rx);
+ return newSVpvs("Regexp");
+}
/* Scans the name of a named buffer from the pattern.
* If flags is REG_RSN_RETURN_NULL returns null.
EXTCONST regexp_engine PL_core_reg_engine;
#else /* DOINIT */
EXTCONST regexp_engine PL_core_reg_engine = {
- Perl_re_compile,
+ Perl_re_compile,
Perl_regexec_flags,
Perl_re_intuit_start,
Perl_re_intuit_string,
Perl_regfree_internal,
Perl_reg_numbered_buff_get,
Perl_reg_named_buff_get,
+ Perl_reg_qr_pkg,
#if defined(USE_ITHREADS)
Perl_regdupe_internal
#endif
void (*free) (pTHX_ struct regexp* r);
SV* (*numbered_buff_get) (pTHX_ const REGEXP * const rx, I32 paren, SV* usesv);
SV* (*named_buff_get)(pTHX_ const REGEXP * const rx, SV* namesv, U32 flags);
+ SV* (*qr_pkg)(pTHX_ const REGEXP * const rx);
#ifdef USE_ITHREADS
void* (*dupe) (pTHX_ const regexp *r, CLONE_PARAMS *param);
#endif