union side_float_value float_value;
/* Stack-copy compound types */
- const struct side_arg_vec *side_struct;
- const struct side_arg_variant *side_variant;
- const struct side_arg_vec *side_array;
- const struct side_arg_vec *side_vla;
+ side_ptr_t(const struct side_arg_vec) side_struct;
+ side_ptr_t(const struct side_arg_variant) side_variant;
+ side_ptr_t(const struct side_arg_vec) side_array;
+ side_ptr_t(const struct side_arg_vec) side_vla;
void *side_vla_app_visitor_ctx;
/* Gather basic types */
#define side_arg_float_binary64(_val) { .type = SIDE_TYPE_FLOAT_BINARY64, .u = { .side_static = { .float_value = { .side_float_binary64 = (_val) } } } }
#define side_arg_float_binary128(_val) { .type = SIDE_TYPE_FLOAT_BINARY128, .u = { .side_static = { .float_value = { .side_float_binary128 = (_val) } } } }
-#define side_arg_struct(_side_type) { .type = SIDE_TYPE_STRUCT, .u = { .side_static = { .side_struct = (_side_type) } } }
+#define side_arg_struct(_side_type) { .type = SIDE_TYPE_STRUCT, .u = { .side_static = { .side_struct = SIDE_PTR_INIT(_side_type) } } }
#define side_arg_define_variant(_identifier, _selector_val, _option) \
const struct side_arg_variant _identifier = { \
.type = SIDE_TYPE_VARIANT, \
.u = { \
.side_static = { \
- .side_variant = (_side_variant), \
+ .side_variant = SIDE_PTR_INIT(_side_variant), \
}, \
}, \
}
-#define side_arg_array(_side_type) { .type = SIDE_TYPE_ARRAY, .u = { .side_static = { .side_array = (_side_type) } } }
-#define side_arg_vla(_side_type) { .type = SIDE_TYPE_VLA, .u = { .side_static = { .side_vla = (_side_type) } } }
+#define side_arg_array(_side_type) { .type = SIDE_TYPE_ARRAY, .u = { .side_static = { .side_array = SIDE_PTR_INIT(_side_type) } } }
+#define side_arg_vla(_side_type) { .type = SIDE_TYPE_VLA, .u = { .side_static = { .side_vla = SIDE_PTR_INIT(_side_type) } } }
#define side_arg_vla_visitor(_ctx) { .type = SIDE_TYPE_VLA_VISITOR, .u = { .side_static = { .side_vla_app_visitor_ctx = (_ctx) } } }
/* Gather field arguments */