X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=autovivification.xs;h=0ca1714b8440bbe13ed9b88993255aa2ad9f9cee;hb=4ae96f44338cb71d96e4be848b4bdd3e7fd353e4;hp=eb1cbbcad762d48e209de8f40048ef578ba6f24a;hpb=32f02f03f98df22086b067e5e81be90c1f83d030;p=perl%2Fmodules%2Fautovivification.git diff --git a/autovivification.xs b/autovivification.xs index eb1cbbc..0ca1714 100644 --- a/autovivification.xs +++ b/autovivification.xs @@ -491,6 +491,7 @@ typedef struct { /* PerlMemShared_free() needs the [ap]PTBLMS_? default values */ #define ptable_map_store(T, K, V) ptable_map_store(aPTBLMS_ (T), (K), (V)) #define ptable_map_delete(T, K) ptable_map_delete(aPTBLMS_ (T), (K)) +#define ptable_map_free(T) ptable_map_free(aPTBLMS_ (T)) static ptable *a_op_map = NULL; @@ -1569,6 +1570,10 @@ static void a_teardown(pTHX_ void *root) { ptable_map_free(a_op_map); a_op_map = NULL; + +#ifdef USE_ITHREADS + MUTEX_DESTROY(&a_op_map_mutex); +#endif } A_LOADED_UNLOCK; @@ -1603,6 +1608,7 @@ static void a_setup(pTHX) { PERL_HASH(a_hash, __PACKAGE__, __PACKAGE_LEN__); a_op_map = ptable_new(); + #ifdef USE_ITHREADS MUTEX_INIT(&a_op_map_mutex); #endif