X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fq.c;h=976684e6d9c491be532de1e1a612d3b647550984;hb=648e7ccd78283cb2403a7bb916e5a79bb434d3a1;hp=55a4c06f8d50db3493a104658d5513d522afc444;hpb=9f2b929b62347a78873023e78d837cb8765c3f54;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) {