Rename bt_ctf_trace_set_byte_order() -> bt_ctf_trace_set_native_byte_order()
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 3 Apr 2017 22:01:06 +0000 (18:01 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:40 +0000 (12:57 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/babeltrace/ctf-ir/trace.h
lib/ctf-ir/trace.c
lib/ctf-writer/writer.c
plugins/ctf/common/metadata/visitor-generate-ir.c
tests/lib/test_ctf_writer.c

index 95b8fef5b3c0b441e21b0522e5d1c510259125e8..af8b9fccf1359cba439ee8bbbb861a153f32c875 100644 (file)
@@ -170,7 +170,7 @@ The created trace class has the following initial properties:
 - <strong>Name</strong>: none. You can set a name
   with bt_ctf_trace_set_name().
 - <strong>Default byte order</strong>: #BT_CTF_BYTE_ORDER_NATIVE. You
 - <strong>Name</strong>: none. You can set a name
   with bt_ctf_trace_set_name().
 - <strong>Default byte order</strong>: #BT_CTF_BYTE_ORDER_NATIVE. You
-  can set a default byte order with bt_ctf_trace_set_byte_order().
+  can set a default byte order with bt_ctf_trace_set_native_byte_order().
 
   Note that you \em must set the default byte order if any field type
   contained in the created trace class, in its stream classes, or in
 
   Note that you \em must set the default byte order if any field type
   contained in the created trace class, in its stream classes, or in
@@ -250,31 +250,31 @@ extern enum bt_ctf_byte_order bt_ctf_trace_get_byte_order(
 
 /**
 @brief Sets the default byte order of the CTF IR trace class
 
 /**
 @brief Sets the default byte order of the CTF IR trace class
-       \p trace_class to \p name.
+       \p trace_class to \p native_byte_order.
 
 
-\p byte_order \em must be one of:
+\p native_byte_order \em must be one of:
 
 - #BT_CTF_BYTE_ORDER_LITTLE_ENDIAN
 - #BT_CTF_BYTE_ORDER_BIG_ENDIAN
 - #BT_CTF_BYTE_ORDER_NETWORK
 
 
 - #BT_CTF_BYTE_ORDER_LITTLE_ENDIAN
 - #BT_CTF_BYTE_ORDER_BIG_ENDIAN
 - #BT_CTF_BYTE_ORDER_NETWORK
 
-@param[in] trace_class Trace class of which to set the default byte
-                       order.
-@param[in] byte_order  Default byte order of the trace class.
-@returns               0 on success, or a negative value on error.
+@param[in] trace_class         Trace class of which to set the default byte
+                               order.
+@param[in] native_byte_order   Default byte order of the trace class.
+@returns                       0 on success, or a negative value on error.
 
 @prenotnull{trace_class}
 @prenotnull{name}
 @prehot{trace_class}
 
 @prenotnull{trace_class}
 @prenotnull{name}
 @prehot{trace_class}
-@pre \p byte_order is either #BT_CTF_BYTE_ORDER_LITTLE_ENDIAN,
+@pre \p native_byte_order is either #BT_CTF_BYTE_ORDER_LITTLE_ENDIAN,
        #BT_CTF_BYTE_ORDER_BIG_ENDIAN, or
        #BT_CTF_BYTE_ORDER_NETWORK.
 @postrefcountsame{trace_class}
 
 @sa bt_ctf_trace_get_name(): Returns the name of a given trace class.
 */
        #BT_CTF_BYTE_ORDER_BIG_ENDIAN, or
        #BT_CTF_BYTE_ORDER_NETWORK.
 @postrefcountsame{trace_class}
 
 @sa bt_ctf_trace_get_name(): Returns the name of a given trace class.
 */
-extern int bt_ctf_trace_set_byte_order(struct bt_ctf_trace *trace_class,
-               enum bt_ctf_byte_order byte_order);
+extern int bt_ctf_trace_set_native_byte_order(struct bt_ctf_trace *trace_class,
+               enum bt_ctf_byte_order native_byte_order);
 
 /**
 @brief Returns the number of entries contained in the environment of
 
 /**
 @brief Returns the number of entries contained in the environment of
index 90432dbac36273de8e896f428aa5e614f79bb6a7..5229338106bc4c37b1c489582a9c87a89e2baa0b 100644 (file)
@@ -89,7 +89,7 @@ struct bt_ctf_trace *bt_ctf_trace_create(void)
                goto error;
        }
 
                goto error;
        }
 
-       bt_ctf_trace_set_byte_order(trace, BT_CTF_BYTE_ORDER_NATIVE);
+       trace->native_byte_order = BT_CTF_BYTE_ORDER_NATIVE;
        bt_object_init(trace, bt_ctf_trace_destroy);
        trace->clocks = g_ptr_array_new_with_free_func(
                (GDestroyNotify) bt_put);
        bt_object_init(trace, bt_ctf_trace_destroy);
        trace->clocks = g_ptr_array_new_with_free_func(
                (GDestroyNotify) bt_put);
@@ -995,7 +995,7 @@ end:
        return ret;
 }
 
        return ret;
 }
 
-int bt_ctf_trace_set_byte_order(struct bt_ctf_trace *trace,
+int bt_ctf_trace_set_native_byte_order(struct bt_ctf_trace *trace,
                enum bt_ctf_byte_order byte_order)
 {
        int ret = 0;
                enum bt_ctf_byte_order byte_order)
 {
        int ret = 0;
index 854de432f36d1e830aa68bae4c819c28ae4c5e7d..c822d63ffc8ff6738a9ed82e6c9263406377cf57 100644 (file)
@@ -298,7 +298,7 @@ int bt_ctf_writer_set_byte_order(struct bt_ctf_writer *writer,
                goto end;
        }
 
                goto end;
        }
 
-       ret = bt_ctf_trace_set_byte_order(writer->trace,
+       ret = bt_ctf_trace_set_native_byte_order(writer->trace,
                byte_order);
 end:
        return ret;
                byte_order);
 end:
        return ret;
index da979078956216f84bf97e5b1f005c94c82ee0b1..3018fbcce16f5e060249f2e312b1e8335cff80dc 100644 (file)
@@ -4123,7 +4123,7 @@ int set_trace_byte_order(struct ctx *ctx, struct ctf_node *trace_node)
                                        goto error;
                                }
 
                                        goto error;
                                }
 
-                               ret = bt_ctf_trace_set_byte_order(
+                               ret = bt_ctf_trace_set_native_byte_order(
                                        ctx->trace, bo);
                                if (ret) {
                                        _PERROR("cannot set trace's byte order (%d)",
                                        ctx->trace, bo);
                                if (ret) {
                                        _PERROR("cannot set trace's byte order (%d)",
index eca6a3108e9ec55d46bee0d3b25be1dca36fa57c..5b256cad222c1f73b1819955def43c8a2f5f4e08 100644 (file)
@@ -2589,7 +2589,7 @@ void test_create_writer_vs_non_writer_mode(void)
        /* Create non-writer trace, stream class, stream, and clock */
        non_writer_trace = bt_ctf_trace_create();
        assert(non_writer_trace);
        /* Create non-writer trace, stream class, stream, and clock */
        non_writer_trace = bt_ctf_trace_create();
        assert(non_writer_trace);
-       ret = bt_ctf_trace_set_byte_order(non_writer_trace,
+       ret = bt_ctf_trace_set_native_byte_order(non_writer_trace,
                BT_CTF_BYTE_ORDER_LITTLE_ENDIAN);
        assert(!ret);
        non_writer_sc = bt_ctf_stream_class_create("nonwriter_sc");
                BT_CTF_BYTE_ORDER_LITTLE_ENDIAN);
        assert(!ret);
        non_writer_sc = bt_ctf_stream_class_create("nonwriter_sc");
@@ -2834,7 +2834,7 @@ int main(int argc, char **argv)
        trace = bt_ctf_writer_get_trace(writer);
        ok(trace,
                "bt_ctf_writer_get_trace returns a bt_ctf_trace object");
        trace = bt_ctf_writer_get_trace(writer);
        ok(trace,
                "bt_ctf_writer_get_trace returns a bt_ctf_trace object");
-       ok(bt_ctf_trace_set_byte_order(trace, BT_CTF_BYTE_ORDER_BIG_ENDIAN) == 0,
+       ok(bt_ctf_trace_set_native_byte_order(trace, BT_CTF_BYTE_ORDER_BIG_ENDIAN) == 0,
                "Set a trace's byte order to big endian");
        ok(bt_ctf_trace_get_byte_order(trace) == BT_CTF_BYTE_ORDER_BIG_ENDIAN,
                "bt_ctf_trace_get_byte_order returns a correct endianness");
                "Set a trace's byte order to big endian");
        ok(bt_ctf_trace_get_byte_order(trace) == BT_CTF_BYTE_ORDER_BIG_ENDIAN,
                "bt_ctf_trace_get_byte_order returns a correct endianness");
This page took 0.029008 seconds and 4 git commands to generate.