mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Make halloc-based list allocation work without context
darcs-hash:20070224131932-ac50b-4523781b1e3cc49e7cd7e3b2e1f21e28b1c5503f.gz
This commit is contained in:
parent
0f51d5ec18
commit
9b10fa4762
1 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ array_list_t *al_halloc( void *context )
|
||||||
if( !res )
|
if( !res )
|
||||||
DIE_MEM();
|
DIE_MEM();
|
||||||
al_init( res );
|
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;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ string_buffer_t *sb_halloc( void *context )
|
||||||
if( !res )
|
if( !res )
|
||||||
DIE_MEM();
|
DIE_MEM();
|
||||||
sb_init( res );
|
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;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue