Skip to content

Commit

Permalink
Make halloc-based list allocation work without context
Browse files Browse the repository at this point in the history
darcs-hash:20070224131932-ac50b-4523781b1e3cc49e7cd7e3b2e1f21e28b1c5503f.gz
  • Loading branch information
liljencrantz committed Feb 24, 2007
1 parent 0f51d5e commit 9b10fa4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions halloc_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ array_list_t *al_halloc( void *context )
if( !res )
DIE_MEM();
al_init( res );
halloc_register_function( context, (void (*)(void *)) &al_destroy, res );
halloc_register_function( context?context:res, (void (*)(void *)) &al_destroy, res );
return res;
}

Expand All @@ -47,7 +47,7 @@ string_buffer_t *sb_halloc( void *context )
if( !res )
DIE_MEM();
sb_init( res );
halloc_register_function( context, (void (*)(void *)) &sb_destroy, res );
halloc_register_function( context?context:res, (void (*)(void *)) &sb_destroy, res );
return res;
}

Expand Down

0 comments on commit 9b10fa4

Please sign in to comment.