mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-12-28 01:24:42 +01:00
8f39002715
This works better in general: let printwire_x do the work of figuring out how to demarshal x. This is particularly important for TLVs, which require a call to tlv_x_new() first. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
20 lines
497 B
C
20 lines
497 B
C
#ifndef LIGHTNING_TOOLS_TEST_ENUM_H
|
|
#define LIGHTNING_TOOLS_TEST_ENUM_H
|
|
#include "config.h"
|
|
#include <ccan/short_types/short_types.h>
|
|
#include <stdbool.h>
|
|
#include <stdlib.h>
|
|
|
|
#define TEST_IFDEF 0
|
|
|
|
enum test_enum {
|
|
TEST_ONE,
|
|
TEST_TWO,
|
|
};
|
|
|
|
void towire_test_enum(u8 **pptr, const enum test_enum test_enum);
|
|
enum test_enum fromwire_test_enum(const u8 **cursor, size_t *max);
|
|
bool printwire_test_enum(const char *fieldname, const u8 **cursor, size_t *max);
|
|
|
|
#endif /* LIGHTNING_TOOLS_TEST_ENUM_H */
|