From: Vincent Pit Date: Thu, 27 Aug 2009 21:47:43 +0000 (+0200) Subject: SvIOK and SvROK imply SvOK X-Git-Tag: v0.19~10 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=d5b0be2a79ccc77838e203313775913dc06f8a96;p=perl%2Fmodules%2Findirect.git SvIOK and SvROK imply SvOK --- diff --git a/indirect.xs b/indirect.xs index 0b8de4d..51199e7 100644 --- a/indirect.xs +++ b/indirect.xs @@ -267,7 +267,7 @@ STATIC SV *indirect_tag(pTHX_ SV *value) { SV *code = NULL; dMY_CXT; - if (SvOK(value) && SvROK(value)) { + if (SvROK(value)) { value = SvRV(value); if (SvTYPE(value) >= SVt_PVCV) { code = value; @@ -313,7 +313,7 @@ STATIC SV *indirect_detag(pTHX_ const SV *hint) { indirect_hint_t *h; dMY_CXT; - if (!(hint && SvOK(hint) && SvIOK(hint))) + if (!(hint && SvIOK(hint))) return NULL; h = ptable_fetch(MY_CXT.tbl, INT2PTR(void *, SvUVX(hint))); @@ -346,7 +346,7 @@ STATIC SV *indirect_tag(pTHX_ SV *value) { #define indirect_tag(V) indirect_tag(aTHX_ (V)) UV tag = 0; - if (SvOK(value) && SvROK(value)) { + if (SvROK(value)) { value = SvRV(value); SvREFCNT_inc_simple_NN(value); tag = PTR2UV(value); @@ -355,7 +355,7 @@ STATIC SV *indirect_tag(pTHX_ SV *value) { return newSVuv(tag); } -#define indirect_detag(H) (((H) && SvOK(H)) ? INT2PTR(SV *, SvUVX(H)) : NULL) +#define indirect_detag(H) (((H) && SvIOK(H)) ? INT2PTR(SV *, SvUVX(H)) : NULL) #endif /* I_THREADSAFE || I_WORKAROUND_REQUIRE_PROPAGATION */