John E. Malmberg [Sat, 27 Aug 2005 19:20:50 +0000 (15:20 -0400)]
From: "John E. Malmberg" <wb8tyw@qsl.net>
Message-ID: <
4310F552.8050401@qsl.net>
p4raw-id: //depot/perl@25335
return Null(HE*);
}
#ifdef DYNAMIC_ENV_FETCH /* set up %ENV for iteration */
- if (!entry && SvRMAGICAL((SV*)hv) && mg_find((SV*)hv, PERL_MAGIC_env))
+ if (!entry && SvRMAGICAL((SV*)hv) && mg_find((SV*)hv, PERL_MAGIC_env)) {
prime_env_iter();
+#ifdef VMS
+ /* The prime_env_iter() on VMS just loaded up new hash values
+ * so the iteration count needs to be reset back to the beginning
+ */
+ hv_iterinit(hv);
+ iter = HvAUX(hv);
+ oldentry = entry = iter->xhv_eiter; /* HvEITER(hv) */
+#endif
+ }
#endif
/* hv_iterint now ensures this. */