X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=ptable.h;h=f3d2712e6b4e6d1d4e32a474e82fa6290db0e246;hp=72be11d4b8ea72c85c1e30d01bccd2f83259acf8;hb=8e1c49f42da7671812398f92d819da04c7a41e1b;hpb=a21a68b2f726d4002d20fb64677a52f72c520964 diff --git a/ptable.h b/ptable.h index 72be11d..f3d2712 100644 --- a/ptable.h +++ b/ptable.h @@ -80,7 +80,7 @@ typedef struct ptable { STATIC ptable *ptable_new(pPTBLMS) { #define ptable_new() ptable_new(aPTBLMS) ptable *t = PerlMemShared_malloc(sizeof *t); - t->max = 127; + t->max = 15; t->items = 0; t->ary = PerlMemShared_calloc(t->max + 1, sizeof *t->ary); return t; @@ -155,7 +155,7 @@ STATIC void PTABLE_PREFIX(_store)(pPTBL_ ptable * const t, const void * const ke void *oldval = ent->val; PTABLE_VAL_FREE(oldval); ent->val = val; - } else { + } else if (val) { const UV i = PTABLE_HASH(key) & t->max; ent = PerlMemShared_malloc(sizeof *ent); ent->key = key;