X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Fautovivification.git;a=blobdiff_plain;f=autovivification.xs;h=3f0eba1293530d1b6413c4a7e0d7e85e0d871db3;hp=554056c1c53a024050d703df2f08cb0346b2093f;hb=2c009c2ccd0f39056b88f99873b5c11a15f39649;hpb=048a0f61d8110a79e17aa1792b6ba1ed38d40e35 diff --git a/autovivification.xs b/autovivification.xs index 554056c..3f0eba1 100644 --- a/autovivification.xs +++ b/autovivification.xs @@ -118,7 +118,7 @@ typedef struct { } a_op_info; #define PTABLE_NAME ptable_map -#define PTABLE_VAL_FREE(V) PerlMemShared_free(V) +#define PTABLE_VAL_FREE(V) XSH_SHARED_FREE((V), 1, a_op_info) #define PTABLE_VAL_NEED_CONTEXT 0 #define PTABLE_NEED_DELETE 1 #define PTABLE_NEED_WALK 0 @@ -168,7 +168,7 @@ static const a_op_info *a_map_store_locked(pPMS_ const OP *o, OP *(*old_pp)(pTHX a_op_info *oi; if (!(oi = ptable_fetch(a_op_map, o))) { - oi = PerlMemShared_malloc(sizeof *oi); + XSH_SHARED_ALLOC(oi, 1, a_op_info); ptable_map_store(a_op_map, o, oi); }