Skip to content

Commit

Permalink
update to current code gen
Browse files Browse the repository at this point in the history
Signed-off-by: Bill Roberts <[email protected]>
  • Loading branch information
williamcroberts committed Mar 5, 2024
1 parent 5a9ed91 commit 1609b19
Show file tree
Hide file tree
Showing 3 changed files with 924 additions and 924 deletions.
10 changes: 5 additions & 5 deletions src/tss2-mu-yaml/yaml-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ struct datum {
size_t size;
generic_marshal marshal;
generic_unmarshal unmarshal;
datum union_extra;
};

struct key_value {
bool is_union;
const char *key;
datum value;
datum union_extra;
};

typedef struct write_data write_data;
Expand All @@ -55,11 +55,11 @@ struct parser_state {
#define FIELD_TYPE(type, field) typeof(((type *)NULL)->field)

/* Adding key values to the list for emitting (generating YAML) */
#define KVP_ADD_MARSHAL(k, s, v, m) {.is_union = false, .key = k, .value = { .data = (void *)v, .size = s, .marshal = m }, .union_extra = { 0 }}
#define KVP_ADD_UNMARSHAL(k, s, v, u) {.is_union = false, .key = k, .value = { .data = (void *)v, .size = s, .unmarshal = u }, .union_extra = { 0 }}
#define KVP_ADD_MARSHAL(k, s, v, m) {.is_union = false, .key = k, .value = { .data = (void *)v, .size = s, .marshal = m, .union_extra = { 0 } }}
#define KVP_ADD_UNMARSHAL(k, s, v, u) {.is_union = false, .key = k, .value = { .data = (void *)v, .size = s, .unmarshal = u, .union_extra = { 0 } }}

#define KVPU_ADD_MARSHAL(k, us, uv, um, s, v, m) {.is_union = true, .key = k, .union_extra = { .data = (void *)uv, .size = us, .marshal = um }, .value = { .data = (void *)v, .size = s, .masrhal = m }}
#define KVPU_ADD_UNMARSHAL(k, us, uv, uu, s, v, u) {.is_union = true, .key = k, .union_extra = { .data = (void *)uv, .size = us, .marshal = uu }, .value = { .data = (void *)v, .size = s, .unmarshal = u }}
#define KVPU_ADD_MARSHAL(k, us, uv, um, s, v, m) {.is_union = true, .key = k, .value = { .data = (void *)v, .size = s, .masrhal = m }, .union_extra = { .data = (void *)uv, .size = us, .marshal = um }}
#define KVPU_ADD_UNMARSHAL(k, us, uv, uu, s, v, u) {.is_union = true, .key = k, .value = { .data = (void *)v, .size = s, .unmarshal = u, .union_extra = { .data = (void *)uv, .size = us, .marshal = uu } }}

#define return_yaml_rc(rc) do { if (!rc) { return yaml_to_tss2_rc(rc); } } while (0)

Expand Down
Loading

0 comments on commit 1609b19

Please sign in to comment.