|
|
@ -83,10 +83,10 @@ typedef struct loaded_binary {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#define CreateOptionalOfType(type) \
|
|
|
|
#define CreateOptionalOfType(type) \
|
|
|
|
typedef struct Optional##type { \
|
|
|
|
typedef struct Optional ## type { \
|
|
|
|
enum error_code error; \
|
|
|
|
enum error_code error; \
|
|
|
|
type value; \
|
|
|
|
type value; \
|
|
|
|
} optional_##type
|
|
|
|
} optional_ ## type
|
|
|
|
|
|
|
|
|
|
|
|
#define has_value(optional) (optional.error == 0)
|
|
|
|
#define has_value(optional) (optional.error == 0)
|
|
|
|
#define has_error(optional) (!has_value(optional))
|
|
|
|
#define has_error(optional) (!has_value(optional))
|
|
|
|