1
0
forked from GitHub/gf-core

a major refactoring in the C runtime. GuList is now removed and replaced with GuSeq. The GuSeq/GuBuf API is simplified

This commit is contained in:
kr.angelov
2013-09-17 12:45:00 +00:00
parent f5461eb3d4
commit 2a49e4e1d6
26 changed files with 420 additions and 615 deletions

View File

@@ -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);