Skip to content

Commit

Permalink
fix enum impl: provide all fields in init
Browse files Browse the repository at this point in the history
  • Loading branch information
ekoby committed Mar 12, 2021
1 parent db609ac commit f7be5b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
fetch-depth: 0
- name: setup/build CMake
run: |
c++ -v
echo "BUILD_NUMBER = ${BUILD_NUMBER}"
cmake -E make_directory ${{runner.workspace}}/build
cmake -S ${{ github.workspace }} -B ${{runner.workspace}}/build
Expand Down
6 changes: 4 additions & 2 deletions includes/ziti/model_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,16 @@ static int Enum##_json(const ptr(Enum) e, int indent, char *json, size_t max, si
return json_enum(e, json, max, len, &Enum##s); \
}\
static type_meta Enum##_meta = {\
.size = sizeof(int), \
.name = #Enum, \
.size = sizeof(Enum), \
.field_count = 0, \
.fields = NULL, \
.comparer = (_cmp_f) cmp_##Enum, \
.parser = (_parse_f) parse_##Enum, \
.jsonifier = (_to_json_f) Enum##_json, \
}; \
type_meta* get_##Enum##_meta() { return &Enum##_meta; }\


#if __cplusplus
}
#endif
Expand Down

0 comments on commit f7be5b6

Please sign in to comment.