diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2003-04-07 11:00:41 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-04-19 07:06:13 +0000 |
commit | dd28f7bb7eebdb0b562c940b3c4f89457e829ea6 (patch) | |
tree | fee71493033bb3c2057e0c4b474527a3abcfe7b1 /av.c | |
parent | bfe0b8460c5710ac333ad9f60968a82600193679 (diff) | |
download | perl-dd28f7bb7eebdb0b562c940b3c4f89457e829ea6.tar.gz |
allow recursive FETCHes
Message-ID: <20030407100041.A1617@fdgroup.com>
p4raw-id: //depot/perl@19268
Diffstat (limited to 'av.c')
-rw-r--r-- | av.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -209,9 +209,11 @@ Perl_av_fetch(pTHX_ register AV *av, I32 key, I32 lval) } sv = sv_newmortal(); - mg_copy((SV*)av, sv, 0, key); - PL_av_fetch_sv = sv; - return &PL_av_fetch_sv; + sv_upgrade(sv, SVt_PVLV); + mg_copy((SV*)av, sv, 0, key); + LvTYPE(sv) = 't'; + LvTARG(sv) = sv; /* fake (SV**) */ + return &(LvTARG(sv)); } } |