summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2017-12-29 12:39:31 +0000
committerZefram <zefram@fysh.org>2017-12-29 12:39:31 +0000
commit7896dde7482a2851e73f0ac2c32d1c71f6e97dca (patch)
tree52321aee169ab06ffe8069908bacf96cbc4b4df9 /universal.c
parent14e4cec412927f1f65c5d2b21526e01b33029447 (diff)
downloadperl-7896dde7482a2851e73f0ac2c32d1c71f6e97dca.tar.gz
revert smartmatch to 5.27.6 behaviour
The pumpking has determined that the CPAN breakage caused by changing smartmatch [perl #132594] is too great for the smartmatch changes to stay in for 5.28. This reverts most of the merge in commit da4e040f42421764ef069371d77c008e6b801f45. All core behaviour and documentation is reverted. The removal of use of smartmatch from a couple of tests (that aren't testing smartmatch) remains. Customisation of a couple of CPAN modules to make them portable across smartmatch types remains. A small bugfix in scope.c also remains.
Diffstat (limited to 'universal.c')
-rw-r--r--universal.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/universal.c b/universal.c
index 30b70ac2f6..2262939b8d 100644
--- a/universal.c
+++ b/universal.c
@@ -986,34 +986,6 @@ XS(XS_re_regexp_pattern)
NOT_REACHED; /* NOTREACHED */
}
-XS(XS_Regexp_smartmatch); /* prototype to pass -Wmissing-prototypes */
-XS(XS_Regexp_smartmatch)
-{
- dXSARGS;
- SV *regexp_sv, *matchee_sv;
- REGEXP *rx;
- regexp *prog;
- const char *strstart, *strend;
- STRLEN len;
-
- if (items != 3)
- croak_xs_usage(cv, "regexp, matchee, swap");
- matchee_sv = SP[-1];
- regexp_sv = SP[-2];
- SP -= 2;
- PUTBACK;
- assert(SvROK(regexp_sv));
- rx = (REGEXP*)SvRV(regexp_sv);
- assert(SvTYPE((SV*)rx) == SVt_REGEXP);
- prog = ReANY(rx);
- strstart = SvPV_const(matchee_sv, len);
- assert(strstart);
- strend = strstart + len;
- TOPs = boolSV((RXp_MINLEN(prog) < 0 || len >= (STRLEN)RXp_MINLEN(prog)) &&
- CALLREGEXEC(rx, (char*)strstart, (char *)strend,
- (char*)strstart, 0, matchee_sv, NULL, 0));
-}
-
#include "vutil.h"
#include "vxs.inc"
@@ -1048,9 +1020,6 @@ static const struct xsub_details details[] = {
{"re::regnames", XS_re_regnames, ";$"},
{"re::regnames_count", XS_re_regnames_count, ""},
{"re::regexp_pattern", XS_re_regexp_pattern, "$"},
- {"Regexp::((", XS_Regexp_smartmatch, NULL},
- {"Regexp::()", XS_Regexp_smartmatch, NULL},
- {"Regexp::(~~", XS_Regexp_smartmatch, NULL},
};
STATIC OP*
@@ -1139,9 +1108,6 @@ Perl_boot_core_UNIVERSAL(pTHX)
*cvfile = (char *)file;
Safefree(oldfile);
}
-
- /* overload fallback flag for Regexp */
- sv_setiv(get_sv("Regexp::()", GV_ADD), 1);
}
/*