This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Use macro instead of recalculating
authorKarl Williamson <khw@cpan.org>
Tue, 22 Dec 2015 00:56:13 +0000 (17:56 -0700)
committerKarl Williamson <khw@cpan.org>
Tue, 22 Dec 2015 20:16:51 +0000 (13:16 -0700)
There is a macro that does the job that this code does.  Use it.

regcomp.c

index b3af3df..f67e3e8 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -13549,10 +13549,7 @@ S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV** return_invlist,
     Perl_ck_warner_d(aTHX_
         packWARN(WARN_EXPERIMENTAL__REGEX_SETS),
         "The regex_sets feature is experimental" REPORT_LOCATION,
-            UTF8fARG(UTF, (RExC_parse - RExC_precomp), RExC_precomp),
-            UTF8fARG(UTF,
-                     RExC_end - RExC_start - (RExC_parse - RExC_precomp),
-                     RExC_precomp + (RExC_parse - RExC_precomp)));
+        REPORT_LOCATION_ARGS(RExC_parse));
 
     /* Everything in this construct is a metacharacter.  Operands begin with
      * either a '\' (for an escape sequence), or a '[' for a bracketed