diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-19 15:33:23 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-19 15:33:23 +0000 |
commit | d627ae4ec1b0cdf09c0e99c4a5197c0c507bd235 (patch) | |
tree | d85d135594029067faacf138fb3c5ec8c112912e | |
parent | 3fd537d4b944bc7adc1d238aecc5aea20a099af7 (diff) | |
download | perl-d627ae4ec1b0cdf09c0e99c4a5197c0c507bd235.tar.gz |
avhv_keys under Digital UNIX made avhv.t fail because *keysp was
changed by mg_get(*keysp) (!). Introducing a new local variable
fixed it but I don't know if it's a compiler problem or some
other corruption happening elsewhere.
p4raw-id: //depot/perl@269
-rw-r--r-- | av.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -471,12 +471,13 @@ avhv_keys(AV *av) keysp = av_fetch(av, 0, FALSE); if (keysp) { - if (SvGMAGICAL(*keysp)) - mg_get(*keysp); - if (SvROK(*keysp)) { - SV *hash = SvRV(*keysp); - if (SvTYPE(hash) == SVt_PVHV) - keys = (HV*)hash; + SV *sv = *keysp; + if (SvGMAGICAL(sv)) + mg_get(sv); + if (SvROK(sv)) { + sv = SvRV(sv); + if (SvTYPE(sv) == SVt_PVHV) + keys = (HV*)sv; } } if (!keys) |