diff options
author | axel <axel@liljencrantz.se> | 2006-02-10 01:50:20 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-02-10 01:50:20 +1000 |
commit | d1c9bca2e9f0eaac2fb8e00e5ed07e8e2906bb02 (patch) | |
tree | 9de2b4fd732398afaebd00c732d8fe41762ac322 /halloc_util.h | |
parent | 49973b85dac4baf843b95ae22ffaed7f41ae43bc (diff) |
Another halloc:ification of fish. Halloc has been extended to allow registering function calls, this has allowed the creation of halloc-handled arraylists, stringbuffers, etc. More job parsing halloc-ification has reduced the error handling code to only a shadow of it's former self
darcs-hash:20060209155020-ac50b-e119c5293ce2368e252cfc01b98ab7c629fdd678.gz
Diffstat (limited to 'halloc_util.h')
-rw-r--r-- | halloc_util.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/halloc_util.h b/halloc_util.h new file mode 100644 index 00000000..c58dff20 --- /dev/null +++ b/halloc_util.h @@ -0,0 +1,29 @@ +/** + \file halloc_util.h + + Various halloc-related utility functions. +*/ + +#ifndef FISH_HALLOC_UTIL_H +#define FISH_HALLOC_UTIL_H + +extern void *global_context; + +void halloc_util_init(); + +void halloc_util_destroy(); + + +array_list_t *al_halloc( void *context ); + +string_buffer_t *sb_halloc( void *context ); + +void halloc_register_function_void( void *context, void (*func)() ); +/** + Free the memory pointed to by \c data when the memory pointed to by + \c context is free:d. Note that this will _not_ turn the specified + memory area into a valid halloc context. Only memory areas created + using a call to halloc() can be used as a context. +*/ +void *halloc_register( void *context, void *data ); +#endif |