X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/e4a6e620255f7a2141e9a9125ff9417d0ca3e794..29ec702ec056996e86e95b084751d8b24a0b6cdd:/regcomp.c diff --git a/regcomp.c b/regcomp.c index d93e558..a259624 100644 --- a/regcomp.c +++ b/regcomp.c @@ -5500,7 +5500,8 @@ S_add_data(RExC_state_t* const pRExC_state, const char* const s, const U32 n) return count; } -/*XXX: todo make this not included in a non debugging perl */ +/*XXX: todo make this not included in a non debugging perl, but appears to be + * used anyway there, in 'use re' */ #ifndef PERL_IN_XSUB_RE void Perl_reginitcolors(pTHX) @@ -13563,7 +13564,6 @@ parseit: } if (!SIZE_ONLY) { SV* invlist; - char* formatted; char* name; if (UCHARAT(RExC_parse) == '^') { @@ -13584,14 +13584,13 @@ parseit: * will have its name be <__NAME_i>. The design is * discussed in commit * 2f833f5208e26b208886e51e09e2c072b5eabb46 */ - formatted = Perl_form(aTHX_ + name = savepv(Perl_form(aTHX_ "%s%.*s%s\n", (FOLD) ? "__" : "", (int)n, RExC_parse, (FOLD) ? "_i" : "" - ); - name = savepvn(formatted, strlen(formatted)); + )); /* Look up the property name, and get its swash and * inversion list, if the property is found */ @@ -13620,6 +13619,19 @@ parseit: "Property '%"UTF8f"' is unknown", UTF8fARG(UTF, n, name)); } + + /* If the property name doesn't already have a package + * name, add the current one to it so that it can be + * referred to outside it. [perl #121777] */ + if (! instr(name, "::") && PL_curstash) { + char* full_name = Perl_form(aTHX_ + "%s::%s", + HvNAME(PL_curstash), + name); + n = strlen(full_name); + Safefree(name); + name = savepvn(full_name, n); + } Perl_sv_catpvf(aTHX_ listsv, "%cutf8::%"UTF8f"\n", (value == 'p' ? '+' : '!'), UTF8fARG(UTF, n, name)); @@ -14141,7 +14153,7 @@ parseit: && ((prevvalue >= 'a' && value <= 'z') || (prevvalue >= 'A' && value <= 'Z'))) { - _invlist_intersection(this_range, PL_ASCII, + _invlist_intersection(this_range, PL_XPosix_ptrs[_CC_ASCII], &this_range); /* Since this above only contains ascii, the intersection of it