From: Malcolm Beattie Date: Wed, 19 Nov 1997 15:33:23 +0000 (+0000) Subject: avhv_keys under Digital UNIX made avhv.t fail because *keysp was X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d627ae4ec1b0cdf09c0e99c4a5197c0c507bd235;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/av.c b/av.c index 5ac6858..1768442 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)