Merge common macros
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 12 Oct 2022 11:06:38 +0000 (12:06 +0100)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 12 Oct 2022 11:06:38 +0000 (12:06 +0100)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/side/trace.h
src/test.c

index 7b3875bf4b2d3b1f645455344cfa86a97e968fd0..b8399790102420e414d23e1c4dda636fe706c193 100644 (file)
@@ -189,13 +189,7 @@ struct side_arg_vec_description {
                .side_type = side_type_vla_visitor_decl(_elem_type, _begin, _end, _get_next), \
        }
 
-#define side_vla_elem(...) \
-       SIDE_COMPOUND_LITERAL(const struct side_type_description, side_type_decl(__VA_ARGS__))
-
-#define side_vla_visitor_elem(...) \
-       SIDE_COMPOUND_LITERAL(const struct side_type_description, side_type_decl(__VA_ARGS__))
-
-#define side_array_elem(...) \
+#define side_elem(...) \
        SIDE_COMPOUND_LITERAL(const struct side_type_description, side_type_decl(__VA_ARGS__))
 
 #define side_field_list(...) \
index 8512882d450546615b33f8e5ffdd6859f3b82eb4..130b93696596d3d2d3fd28ebb1bdad942ed06904 100644 (file)
@@ -55,7 +55,7 @@ void test_struct(void)
 
 static side_define_event(my_provider_event_array, "myprovider", "myarray", SIDE_LOGLEVEL_DEBUG,
        side_field_list(
-               side_field_array("arr", side_array_elem(SIDE_TYPE_U32), 3),
+               side_field_array("arr", side_elem(SIDE_TYPE_U32), 3),
                side_field(SIDE_TYPE_S64, "v"),
        )
 );
@@ -72,7 +72,7 @@ void test_array(void)
 
 static side_define_event(my_provider_event_vla, "myprovider", "myvla", SIDE_LOGLEVEL_DEBUG,
        side_field_list(
-               side_field_vla("vla", side_vla_elem(SIDE_TYPE_U32)),
+               side_field_vla("vla", side_elem(SIDE_TYPE_U32)),
                side_field(SIDE_TYPE_S64, "v"),
        )
 );
@@ -121,7 +121,7 @@ static uint32_t testarray[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
 
 static side_define_event(my_provider_event_vla_visitor, "myprovider", "myvlavisit", SIDE_LOGLEVEL_DEBUG,
        side_field_list(
-               side_field_vla_visitor("vlavisit", side_vla_visitor_elem(SIDE_TYPE_U32),
+               side_field_vla_visitor("vlavisit", side_elem(SIDE_TYPE_U32),
                        test_visitor_begin, test_visitor_end, test_visitor_get_next),
                side_field(SIDE_TYPE_S64, "v"),
        )
This page took 0.026217 seconds and 4 git commands to generate.