wire/tlvstream: const.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2022-03-31 19:39:05 +10:30
parent 9bddfc2048
commit 906fb6ca86
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ static struct tlv_field *tlvstream_get_raw(struct tlv_field *stream, u64 type)
return NULL;
}
void tlvstream_set_raw(struct tlv_field **stream, u64 type, void *value TAKES, size_t valuelen)
void tlvstream_set_raw(struct tlv_field **stream, u64 type, const void *value TAKES, size_t valuelen)
{
struct tlv_field f, *e = tlvstream_get_raw(*stream, type);

View File

@ -65,7 +65,7 @@ size_t tlv_field_offset(const u8 *tlvstream, size_t tlvlen, u64 fieldtype);
extern const u64 *FROMWIRE_TLV_ANY_TYPE;
/* Generic primitive setters for tlvstreams. */
void tlvstream_set_raw(struct tlv_field **stream, u64 type, void *value TAKES, size_t valuelen);
void tlvstream_set_raw(struct tlv_field **stream, u64 type, const void *value TAKES, size_t valuelen);
void tlvstream_set_short_channel_id(struct tlv_field **stream, u64 type,
struct short_channel_id *value);
void tlvstream_set_tu64(struct tlv_field **stream, u64 type, u64 value);