X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=indirect.xs;h=8f673e12d1cb9bc6a2e7365a3bc35238eae7e0f4;hp=51199e791badd9c21043fedc4e45095e9a96a731;hb=28c424672aa75950b69186b3a7bee3f93b4a580a;hpb=d5b0be2a79ccc77838e203313775913dc06f8a96 diff --git a/indirect.xs b/indirect.xs index 51199e7..8f673e1 100644 --- a/indirect.xs +++ b/indirect.xs @@ -305,7 +305,7 @@ STATIC SV *indirect_tag(pTHX_ SV *value) { * use the value pointer as the key itself. */ ptable_hints_store(MY_CXT.tbl, value, h); - return newSVuv(PTR2UV(value)); + return newSViv(PTR2IV(value)); } STATIC SV *indirect_detag(pTHX_ const SV *hint) { @@ -316,7 +316,7 @@ STATIC SV *indirect_detag(pTHX_ const SV *hint) { if (!(hint && SvIOK(hint))) return NULL; - h = ptable_fetch(MY_CXT.tbl, INT2PTR(void *, SvUVX(hint))); + h = ptable_fetch(MY_CXT.tbl, INT2PTR(void *, SvIVX(hint))); #if I_WORKAROUND_REQUIRE_PROPAGATION { @@ -349,13 +349,13 @@ STATIC SV *indirect_tag(pTHX_ SV *value) { if (SvROK(value)) { value = SvRV(value); SvREFCNT_inc_simple_NN(value); - tag = PTR2UV(value); + tag = PTR2IV(value); } - return newSVuv(tag); + return newSViv(tag); } -#define indirect_detag(H) (((H) && SvIOK(H)) ? INT2PTR(SV *, SvUVX(H)) : NULL) +#define indirect_detag(H) (((H) && SvIOK(H)) ? INT2PTR(SV *, SvIVX(H)) : NULL) #endif /* I_THREADSAFE || I_WORKAROUND_REQUIRE_PROPAGATION */