2021-12-04 12:23:56 +01:00
|
|
|
#include "config.h"
|
2019-07-23 22:53:44 +02:00
|
|
|
#include "enum.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
void towire_test_enum(u8 **pptr, const enum test_enum test_enum)
|
|
|
|
{
|
|
|
|
printf("this would have been the towire for enum %u\n", test_enum);
|
|
|
|
}
|
|
|
|
|
|
|
|
enum test_enum fromwire_test_enum(const u8 **cursor, size_t *max)
|
|
|
|
{
|
2019-07-25 04:19:21 +02:00
|
|
|
printf("fromwire_test_enum at %zu\n", *max);
|
2019-07-23 22:53:44 +02:00
|
|
|
return TEST_ONE;
|
|
|
|
}
|
|
|
|
|
2022-03-23 00:31:14 +01:00
|
|
|
bool printwire_test_enum(const char *fieldname, const u8 **cursor, size_t *max)
|
2019-07-23 22:53:44 +02:00
|
|
|
{
|
2022-03-23 00:31:14 +01:00
|
|
|
enum test_enum e = fromwire_test_enum(cursor, max);
|
|
|
|
if (!*cursor)
|
|
|
|
return false;
|
|
|
|
printf("%u\n", e);
|
|
|
|
return true;
|
2019-07-23 22:53:44 +02:00
|
|
|
}
|