From f7be5b62a476948efdbe4742b58d43a09a030a65 Mon Sep 17 00:00:00 2001 From: Eugene K Date: Thu, 11 Mar 2021 23:23:12 -0500 Subject: [PATCH] fix enum impl: provide all fields in init --- .github/workflows/cmake.yml | 1 - includes/ziti/model_support.h | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 50bc032d..60b963a3 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -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 diff --git a/includes/ziti/model_support.h b/includes/ziti/model_support.h index d02f1c77..3b79adef 100644 --- a/includes/ziti/model_support.h +++ b/includes/ziti/model_support.h @@ -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