summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2006-10-06 21:16:01 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-10-07 14:30:32 +0000
commit81714fb9c03d91d66b66cab6e899e81bf64a2ca7 (patch)
tree40861dec0355f417fff2a7ff3c393082960066cc /gv.c
parentf5def3a2a0d8913110936f9f4e13e37835754c28 (diff)
downloadperl-81714fb9c03d91d66b66cab6e899e81bf64a2ca7.tar.gz
Re: [PATCH] Initial attempt at named captures for perls regexp engine
Message-ID: <9b18b3110610061016x5ddce965u30d9a821f632d450@mail.gmail.com> p4raw-id: //depot/perl@28957
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gv.c b/gv.c
index 637e82f7cf..9ad44340e5 100644
--- a/gv.c
+++ b/gv.c
@@ -1188,10 +1188,14 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
goto magicalize;
case '+':
+ GvMULTI_on(gv);
{
AV* const av = GvAVn(gv);
+ HV* const hv = GvHVn(gv);
sv_magic((SV*)av, (SV*)av, PERL_MAGIC_regdata, NULL, 0);
SvREADONLY_on(av);
+ hv_magic(hv, NULL, PERL_MAGIC_regdata_names);
+ SvREADONLY_on(hv);
/* FALL THROUGH */
}
case '\023': /* $^S */