X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fq.h;h=cc965b0391ac9c716acfadcdfec504213e142df2;hb=baf1f621c945198d5b54c5415a2a2b648adf51b6;hp=6eec83c147c9ad58e099133eea0e9a2591e0e6dc;hpb=dc2f5b1a42742e40a1e5f9dfc6ecb63997e6cd09;p=swftools.git diff --git a/lib/q.h b/lib/q.h index 6eec83c..cc965b0 100644 --- a/lib/q.h +++ b/lib/q.h @@ -35,6 +35,7 @@ typedef struct _mem_t { char*buffer; int len; int pos; + int read_pos; } mem_t; /* fifo buffered growing mem region */ @@ -127,6 +128,7 @@ unsigned int crc32_add_string(unsigned int crc32, const char*s); void mem_init(mem_t*mem); int mem_put(mem_t*m, void*data, int length); int mem_putstring(mem_t*m, string_t str); +int mem_get(mem_t*m, void*data, int length); void mem_clear(mem_t*mem); void mem_destroy(mem_t*mem); @@ -178,8 +180,9 @@ dict_t*dict_clone(dict_t*); void dict_foreach_keyvalue(dict_t*h, void (*runFunction)(void*data, const void*key, void*val), void*data); void dict_foreach_value(dict_t*h, void (*runFunction)(void*)); -void dict_free_all(dict_t*h, void (*freeFunction)(void*)); +void dict_free_all(dict_t*h, char free_keys, void (*free_data_function)(void*)); void dict_clear(dict_t*h); +void dict_destroy_shallow(dict_t*dict); void dict_destroy(dict_t*dict); void map_init(map_t*map);