summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-11-19 15:33:23 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-11-19 15:33:23 +0000
commitd627ae4ec1b0cdf09c0e99c4a5197c0c507bd235 (patch)
treed85d135594029067faacf138fb3c5ec8c112912e /av.c
parent3fd537d4b944bc7adc1d238aecc5aea20a099af7 (diff)
downloadperl-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
Diffstat (limited to 'av.c')
-rw-r--r--av.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/av.c b/av.c
index 5ac68587cc..176844294e 100644
--- a/av.c
+++ b/av.c
@@ -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)