X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=indirect.xs;h=01e7a33441c549da35485901f97c1b7c4fb60f30;hb=2d1491ff7f2e6b5d845c5dc8f7631340d81bf4a8;hp=eb6f01f704787ba4785c0b7b1760895aa750972e;hpb=8291ef989ac98ee2cb53a6098eed7aa7c3ed0ca8;p=perl%2Fmodules%2Findirect.git diff --git a/indirect.xs b/indirect.xs index eb6f01f..01e7a33 100644 --- a/indirect.xs +++ b/indirect.xs @@ -134,12 +134,8 @@ typedef struct { #define PTABLE_NAME ptable_hints -#if I_WORKAROUND_REQUIRE_PROPAGATION -# define PTABLE_VAL_FREE(V) \ +#define PTABLE_VAL_FREE(V) \ { indirect_hint_t *h = (V); SvREFCNT_dec(h->code); PerlMemShared_free(h); } -#else -# define PTABLE_VAL_FREE(V) SvREFCNT_dec(V) -#endif #define pPTBL pTHX #define pPTBL_ pTHX_ @@ -167,7 +163,6 @@ typedef struct { #include "ptable.h" #define ptable_store(T, K, V) ptable_store(aTHX_ (T), (K), (V)) -#define ptable_delete(T, K) ptable_delete(aTHX_ (T), (K)) #define ptable_clear(T) ptable_clear(aTHX_ (T)) #define ptable_free(T) ptable_free(aTHX_ (T)) @@ -328,7 +323,7 @@ STATIC U32 indirect_hash = 0; STATIC SV *indirect_hint(pTHX) { #define indirect_hint() indirect_hint(aTHX) - SV *hint, *code; + SV *hint; #if I_HAS_PERL(5, 9, 5) hint = Perl_refcounted_he_fetch(aTHX_ PL_curcop->cop_hints_hash, NULL, @@ -396,7 +391,7 @@ STATIC void indirect_map_delete(pTHX_ const OP *o) { #define indirect_map_delete(O) indirect_map_delete(aTHX_ (O)) dMY_CXT; - ptable_delete(MY_CXT.map, o); + ptable_store(MY_CXT.map, o, NULL); } /* --- Check functions ----------------------------------------------------- */