X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=indirect.xs;h=45309ce648a1cf43b3b0cccd4a31b076d864a616;hp=12e83d5c92ad1fe3b3c7265655371165cb69491d;hb=8e1c49f42da7671812398f92d819da04c7a41e1b;hpb=9856d89db33e335664cca6910de72b53e0e12763 diff --git a/indirect.xs b/indirect.xs index 12e83d5..45309ce 100644 --- a/indirect.xs +++ b/indirect.xs @@ -351,6 +351,10 @@ STATIC U32 indirect_hash = 0; STATIC SV *indirect_hint(pTHX) { #define indirect_hint() indirect_hint(aTHX) SV *hint; + + if (IN_PERL_RUNTIME) + return NULL; + #if I_HAS_PERL(5, 9, 5) hint = Perl_refcounted_he_fetch(aTHX_ PL_curcop->cop_hints_hash, NULL, @@ -358,11 +362,13 @@ STATIC SV *indirect_hint(pTHX) { 0, indirect_hash); #else - SV **val = hv_fetch(GvHV(PL_hintgv), __PACKAGE__, __PACKAGE_LEN__, + { + SV **val = hv_fetch(GvHV(PL_hintgv), __PACKAGE__, __PACKAGE_LEN__, indirect_hash); - if (!val) - return 0; - hint = *val; + if (!val) + return 0; + hint = *val; + } #endif return indirect_detag(hint); }