summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)