mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 03:32:27 +08:00
Make halloc-based list allocation work without context
darcs-hash:20070224131932-ac50b-4523781b1e3cc49e7cd7e3b2e1f21e28b1c5503f.gz
This commit is contained in:
parent
0f51d5ec18
commit
9b10fa4762
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user