mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
tal: don't access low-level tal functions.
In several places we use low-level tal functions because we want the label to be something other than the default. ccan/tal is adding tal_*_label so replace them and shim it for now. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
5cf34d6618
commit
337075dc8c
@@ -39,7 +39,7 @@ void setup_locale(void)
|
||||
/* Initial creation of tmpctx. */
|
||||
void setup_tmpctx(void)
|
||||
{
|
||||
tmpctx = tal_alloc_(NULL, 0, false, false, "tmpctx");
|
||||
tmpctx = tal_arr_label(NULL, char, 0, "tmpctx");
|
||||
}
|
||||
|
||||
/* Free any children of tmpctx. */
|
||||
@@ -48,6 +48,6 @@ void clean_tmpctx(void)
|
||||
/* Minor optimization: don't do anything if tmpctx unused. */
|
||||
if (tal_first(tmpctx)) {
|
||||
tal_free(tmpctx);
|
||||
tmpctx = tal_alloc_(NULL, 0, false, false, "tmpctx");
|
||||
tmpctx = tal_arr_label(NULL, char, 0, "tmpctx");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user