diff options
author | Stephen McCamant <alias@mcs.com> | 1997-06-15 21:23:45 +1200 |
---|---|---|
committer | Tim Bunce <Tim.Bunce@ig.co.uk> | 1997-08-07 00:00:00 +1200 |
commit | 706a304b44357647b233945e4e432234718ab515 (patch) | |
tree | 3ba80bbbfc7a21f4e239b1548dc9c3ba91ef06f5 /pp_hot.c | |
parent | 21fc060b433a5fd003b9aca5789342207c46ada4 (diff) | |
download | perl-706a304b44357647b233945e4e432234718ab515.tar.gz |
Band-aid fix for local([@%]$x)
This fixes the segfaults by extending the prohibition on `local($$x)'
to array and hash dereferences and removing the code that never
worked. It also adds simple test cases and a `through' to the error
message.
The new explanation in perldiag isn't terribly clear, but the old one
told an untruth.
It should be possible to make local([$@%]$x) work by adding a new
SAVEt type, and I'd like to do so in the future, but that certainly
wouldn't be maintenance patch material.
p5p-msgid: m0wsb7J-000EYPC@alias-2.pr.mcs.net
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -426,8 +426,6 @@ PP(pp_rv2av) av = (AV*)SvRV(sv); if (SvTYPE(av) != SVt_PVAV) DIE("Not an ARRAY reference"); - if (op->op_private & OPpLVAL_INTRO) - av = (AV*)save_svref((SV**)sv); if (op->op_flags & OPf_REF) { PUSHs((SV*)av); RETURN; @@ -503,8 +501,6 @@ PP(pp_rv2hv) hv = (HV*)SvRV(sv); if (SvTYPE(hv) != SVt_PVHV) DIE("Not a HASH reference"); - if (op->op_private & OPpLVAL_INTRO) - hv = (HV*)save_svref((SV**)sv); if (op->op_flags & OPf_REF) { SETs((SV*)hv); RETURN; |