Skip to content

Instantly share code, notes, and snippets.

@Yardanico

Yardanico/test.c Secret

Created May 20, 2020 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yardanico/495a87da26c08c441509267f98b60864 to your computer and use it in GitHub Desktop.
Save Yardanico/495a87da26c08c441509267f98b60864 to your computer and use it in GitHub Desktop.
typedef NU8 tyEnum_EnumKind__HznZsN6fMsJhxEwk9c3lM7A;
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tyObject_Test__u05pFSL5Fo2sfuv1oH9btJw {
tyEnum_EnumKind__HznZsN6fMsJhxEwk9c3lM7A kind;
union{
NimStringV2 data;
NI test;
NF ok;
};
};
type
EnumKind = enum
Tata, Lol,Fa
Test* = object
case kind*: EnumKind
of Tata: data: string
of Lol: test: int
of Fa: ok: float
let a = Test(kind: Tata, data: "hello")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment