ccan: upgrade to new ccan/tal and ccan/tal/str.
The visible changes are: 1. tal_len() is renamed to tal_bytelen() for clarity. 2. tal allocations *always* know their length. 3. tal/str routines always set the length to strlen() + 1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
337075dc8c
commit
5179025977
@@ -16,12 +16,4 @@
|
||||
#define sha256_be16(ctx, v) ccan_sha256_be16(ctx, v)
|
||||
#define sha256_be32(ctx, v) ccan_sha256_be32(ctx, v)
|
||||
#define sha256_be64(ctx, v) ccan_sha256_be64(ctx, v)
|
||||
|
||||
/* Transition for ccan update. */
|
||||
#define tal_bytelen(x) tal_len(x)
|
||||
#define tal_arr_label(ctx, type, len, label) \
|
||||
((type *)tal_alloc_arr_(ctx, sizeof(type), len, false, true, label))
|
||||
#define tal_arrz_label(ctx, type, len, label) \
|
||||
((type *)tal_alloc_arr_(ctx, sizeof(type), len, true, true, label))
|
||||
|
||||
#endif /* LIGHTNING_CCAN_COMPAT_H */
|
||||
|
||||
Reference in New Issue
Block a user