X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fq.c;h=1d50ca3297b84b1a3b6f33cbb38b03f5aeef8f44;hp=3416a0ff5371749d81a6ada04c326ac3768d9663;hb=71b11cc925e384ecad5b0f48b511bcadc2867f9b;hpb=66a03382aab040571f94b0861719753bda3ff8f1 diff --git a/lib/q.c b/lib/q.c index 3416a0f..1d50ca3 100644 --- a/lib/q.c +++ b/lib/q.c @@ -524,13 +524,14 @@ void trie_rollback(trie_t*t) // ------------------------------- crc32 -------------------------------------- -static unsigned int*crc32 = 0; +static unsigned int crc32[256]; +static char crc32_initialized=0; static void crc32_init(void) { int t; - if(crc32) + if(crc32_initialized) return; - crc32= (unsigned int*)rfx_alloc(sizeof(unsigned int)*256); + crc32_initialized = 1; for(t=0; t<256; t++) { unsigned int c = t; int s; @@ -1144,7 +1145,7 @@ char dict_del(dict_t*h, const void*key) while(e) { if(h->key_type->equals(e->key, key)) { dictentry_t*next = e->next; - rfx_free((void*)e->key); + h->key_type->free(e->key); memset(e, 0, sizeof(dictentry_t)); rfx_free(e); if(e == head) {