trace.h: Use side_ptr_t for stack-copy compound type args
[libside.git] / include / side / trace.h
index 42aba087ebd03048024918ed8f511bb128e93c10..76c82b84dcaa328329542f616e1305696498c6ee 100644 (file)
@@ -530,10 +530,10 @@ union side_arg_static {
        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 */
@@ -1445,7 +1445,7 @@ struct side_event_description {
 #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 = { \
@@ -1457,13 +1457,13 @@ struct side_event_description {
                .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 */
This page took 0.026109 seconds and 4 git commands to generate.