summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-09-12 15:39:39 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-09-12 16:16:06 -0700
commitb4fa55d3f12c6d98b13a8b3db4f8d921c8e56edc (patch)
treee45b0b623b0d46059994b2fce79b623e1fc418e1 /regcomp.c
parent57ae61efb92039dfd13bb45ab5540e9b646a8cf5 (diff)
downloadperl-b4fa55d3f12c6d98b13a8b3db4f8d921c8e56edc.tar.gz
Gut Perl_save_re_context
What it does is not longer necessary. See ticket #122747 and commits 2c1f00b90 and 7d75537e. The only CPAN module using this function, XML::Fast, passes its tests with this change.
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/regcomp.c b/regcomp.c
index 726a655095..fa082291f5 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -16786,32 +16786,14 @@ S_re_croak2(pTHX_ bool utf8, const char* pat1,const char* pat2,...)
Perl_croak(aTHX_ "%"UTF8f, UTF8fARG(utf8, l1-1, buf));
}
-/* XXX Here's a total kludge. But we need to re-enter for swash routines. */
+/* Get this: We have an empty void function here. But it somehow got into
+ the API, so there you go. */
#ifndef PERL_IN_XSUB_RE
void
Perl_save_re_context(pTHX)
{
- /* Save $1..$n (#18107: UTF-8 s/(\w+)/uc($1)/e); AMS 20021106. */
- if (PL_curpm) {
- const REGEXP * const rx = PM_GETRE(PL_curpm);
- if (rx) {
- U32 i;
- for (i = 1; i <= RX_NPARENS(rx); i++) {
- char digits[TYPE_CHARS(long)];
- const STRLEN len = my_snprintf(digits, sizeof(digits),
- "%lu", (long)i);
- GV *const *const gvp
- = (GV**)hv_fetch(PL_defstash, digits, len, 0);
-
- if (gvp) {
- GV * const gv = *gvp;
- if (SvTYPE(gv) == SVt_PVGV && GvSV(gv))
- save_scalar(gv);
- }
- }
- }
- }
+ PERL_UNUSED_CONTEXT;
}
#endif