diff options
Diffstat (limited to 'src/runtime/c/gu/variant.h')
| -rw-r--r-- | src/runtime/c/gu/variant.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/runtime/c/gu/variant.h b/src/runtime/c/gu/variant.h index a9bb10a4a..ab1265ff1 100644 --- a/src/runtime/c/gu/variant.h +++ b/src/runtime/c/gu/variant.h @@ -148,7 +148,10 @@ struct GuConstructor { -typedef GuSList(GuConstructor) GuConstructors; +typedef struct { + int len; + GuConstructor* elems; +} GuConstructors; typedef const struct GuVariantType GuVariantType, GuType_GuVariant; @@ -159,7 +162,10 @@ struct GuVariantType { #define GU_TYPE_INIT_GuVariant(k_, t_, ...) { \ .repr_base = GU_TYPE_INIT_repr(k_, GuVariant, _), \ - .ctors = GU_SLIST(GuConstructor, __VA_ARGS__) \ + .ctors = { \ + .len = GU_ARRAY_LEN(GuConstructor,GU_ID({__VA_ARGS__})), \ + .elems = ((GuConstructor[]){__VA_ARGS__}) \ + } \ } extern GU_DECLARE_KIND(GuVariant); |
