made optionals for c11 actually work...

This commit is contained in:
ed committed 2025-02-11 19:24:42 -05:00
1 parent 75b1d42cca
commit ef72d27f3e
3 files changed
+70 -21

No files matched your search

+8
View File
@@ -314,4 +314,12 @@
# define GEN_OPITMIZE_MAPPINGS_END
#endif
#ifndef get_optional
# if GEN_COMPILER_C
# define get_optional(opt) opt ? *opt : (typeof(*opt)){0}
# else
# define get_optional(opt) opt
# endif
#endif
#pragma endregion Macros