made optionals for c11 actually work...

This commit is contained in:
2025-02-11 19:24:42 -05:00
parent 75b1d42cca
commit ef72d27f3e
3 changed files with 70 additions and 21 deletions

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