X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fq.c;h=976684e6d9c491be532de1e1a612d3b647550984;hb=434d5040b814eae784d080c695fe8c3d370a166b;hp=55a4c06f8d50db3493a104658d5513d522afc444;hpb=90916f8638e4a996fc945e5ed90d7618d3dca0f6;p=swftools.git diff --git a/lib/q.c b/lib/q.c index 55a4c06..976684e 100644 --- a/lib/q.c +++ b/lib/q.c @@ -764,6 +764,14 @@ void dict_init(dict_t*h, int size) h->num = 0; h->key_type = &charptr_type; } +void dict_init2(dict_t*h, type_t*t, int size) +{ + memset(h, 0, sizeof(dict_t)); + h->hashsize = size; + h->slots = h->hashsize?(dictentry_t**)rfx_calloc(sizeof(dictentry_t*)*h->hashsize):0; + h->num = 0; + h->key_type = t; +} dict_t*dict_clone(dict_t*o) {