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 /event.c | |
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 'event.c')
-rw-r--r-- | event.c | 15 |
1 files changed, 3 insertions, 12 deletions
@@ -21,6 +21,7 @@ #include "event.h" #include "signal.h" #include "translate.h" +#include "halloc_util.h" /** Number of signals that can be queued before an overflow occurs @@ -194,10 +195,7 @@ const wchar_t *event_get_desc( event_t *e ) { if( !get_desc_buff ) { - get_desc_buff=malloc(sizeof(string_buffer_t) ); - if( !get_desc_buff ) - die_mem(); - sb_init( get_desc_buff ); + get_desc_buff=sb_halloc( global_context ); } else { @@ -255,7 +253,7 @@ void event_add_handler( event_t *event ) e = event_copy( event, 0 ); if( !events ) - events = al_new(); + events = al_new(); if( e->type == EVENT_SIGNAL ) { @@ -644,13 +642,6 @@ void event_destroy() free( killme ); killme=0; } - - if( get_desc_buff ) - { - sb_destroy( get_desc_buff ); - free( get_desc_buff ); - } - } void event_free( event_t *e ) |