diff options
author | Yves Orton <demerphq@gmail.com> | 2007-06-28 23:14:39 +0000 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2007-06-28 23:14:39 +0000 |
commit | f1b875a0a91038690cebe55acd7ad1e37e6a2621 (patch) | |
tree | af2c0780befa801256117288794b44649166c71f /universal.c | |
parent | 7bd1e61447493a93405e0d15fe2f8a0b6bf71de1 (diff) | |
download | perl-f1b875a0a91038690cebe55acd7ad1e37e6a2621.tar.gz |
Rename various regex defined so that they have distinct prefixes based on their usage.
RXf_ => flags used in pm_flags argument to regcomp
and stored in the regex via rx->extflags
PREGf_ => flags stored in rx->intflags
RXapif_ => argument flags for regex named capture api
RX_BUFF_IDX_ => special indexes to represent $` $' $&
used in the numeric capture buffer api
PREGf is untouched by this change, but RXf_ is split into RXapif and RX_BUFF_IDX_.
p4raw-id: //depot/perl@31497
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/universal.c b/universal.c index 2b39583bfd..457fffaf9c 100644 --- a/universal.c +++ b/universal.c @@ -1118,11 +1118,11 @@ XS(XS_re_regname) XSRETURN_UNDEF; if (items == 2 && SvTRUE(ST(1))) { - flags = RXf_HASH_ALL; + flags = RXapif_ALL; } else { - flags = RXf_HASH_ONE; + flags = RXapif_ONE; } - ret = CALLREG_NAMED_BUFF_FETCH(rx, ST(0), (flags | RXf_HASH_REGNAME)); + ret = CALLREG_NAMED_BUFF_FETCH(rx, ST(0), (flags | RXapif_REGNAME)); if (ret) { if (SvROK(ret)) @@ -1157,14 +1157,14 @@ XS(XS_re_regnames) XSRETURN_UNDEF; if (items == 1 && SvTRUE(ST(0))) { - flags = RXf_HASH_ALL; + flags = RXapif_ALL; } else { - flags = RXf_HASH_ONE; + flags = RXapif_ONE; } SP -= items; - ret = CALLREG_NAMED_BUFF_ALL(rx, (flags | RXf_HASH_REGNAMES)); + ret = CALLREG_NAMED_BUFF_ALL(rx, (flags | RXapif_REGNAMES)); SPAGAIN; @@ -1427,8 +1427,8 @@ XS(XS_Tie_Hash_NamedCapture_flags) if (items != 0) Perl_croak(aTHX_ "Usage: Tie::Hash::NamedCapture::flags()"); - XPUSHs(sv_2mortal(newSVuv(RXf_HASH_ONE))); - XPUSHs(sv_2mortal(newSVuv(RXf_HASH_ALL))); + XPUSHs(sv_2mortal(newSVuv(RXapif_ONE))); + XPUSHs(sv_2mortal(newSVuv(RXapif_ALL))); PUTBACK; return; } |