From: gfx Date: Sat, 27 Feb 2010 02:55:55 +0000 (+0900) Subject: Reset stash iterators X-Git-Tag: 0.50_05~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fa4ac6485baa33fc2e12f9a9924ff428b0403fa5;p=gitmo%2FMouse.git Reset stash iterators --- diff --git a/xs-src/MouseUtil.xs b/xs-src/MouseUtil.xs index fad81d0..3c02d18 100644 --- a/xs-src/MouseUtil.xs +++ b/xs-src/MouseUtil.xs @@ -176,11 +176,13 @@ mouse_is_class_loaded(pTHX_ SV * const klass){ GV* const gv = (GV*)HeVAL(he); if(isGV(gv)){ - if(GvCVu(gv)){ + if(GvCVu(gv)){ /* is GV and has CV */ + hv_iterinit(stash); /* reset */ return TRUE; } } - else if(SvOK(gv)){ + else if(SvOK(gv)){ /* is a stub or constant */ + hv_iterinit(stash); /* reset */ return TRUE; } }