X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=indirect.xs;h=2d02563f3fe1f437801d0a3887a699a2d05ee3ab;hb=b78d08a728ad517a03a0b7302f45201964654488;hp=a9012cdf062582057bbc6e80a72fc83cfc4b6116;hpb=9e7e0702d84f54976fa798516817f55e342fe0be;p=perl%2Fmodules%2Findirect.git diff --git a/indirect.xs b/indirect.xs index a9012cd..2d02563 100644 --- a/indirect.xs +++ b/indirect.xs @@ -22,14 +22,14 @@ STATIC U32 indirect_hash = 0; -STATIC UV indirect_hint(pTHX) { +STATIC IV indirect_hint(pTHX) { #define indirect_hint() indirect_hint(aTHX) SV *id = Perl_refcounted_he_fetch(aTHX_ PL_curcop->cop_hints_hash, NULL, "indirect", 8, 0, indirect_hash); - return SvIOK(id) ? SvUV(id) : 0; + return (id && SvOK(id) && SvIOK(id)) ? SvIV(id) : 0; } /* ... op -> source position ............................................... */ @@ -187,7 +187,7 @@ STATIC OP *(*indirect_old_ck_entersub)(pTHX_ OP *) = 0; STATIC OP *indirect_ck_entersub(pTHX_ OP *o) { LISTOP *op; OP *om, *oo; - UV hint = indirect_hint(); + IV hint = indirect_hint(); if (hint) { const char *pm, *po;