lib: rename transforming bt_X_borrow_Y() -> bt_X_as_Y()
[babeltrace.git] / plugins / ctf / common / notif-iter / notif-iter.c
index 259bb5cdc5f4d6b11c85403edaa04cff865390c1..4ebff2ae0e6fa3462d49647ff297f67b59e64085 100644 (file)
@@ -1694,12 +1694,12 @@ struct bt_private_field *borrow_next_field(struct bt_notif_iter *notit)
        BT_ASSERT(base_fc);
 
        switch (bt_field_class_get_type(
-               bt_private_field_class_borrow_field_class(base_fc))) {
+               bt_private_field_class_as_field_class(base_fc))) {
        case BT_FIELD_CLASS_TYPE_STRUCTURE:
        {
                BT_ASSERT(index <
                        bt_field_class_structure_get_member_count(
-                               bt_private_field_class_borrow_field_class(
+                               bt_private_field_class_as_field_class(
                                        bt_private_field_borrow_class(
                                                base_field))));
                next_field =
@@ -1710,7 +1710,7 @@ struct bt_private_field *borrow_next_field(struct bt_notif_iter *notit)
        case BT_FIELD_CLASS_TYPE_STATIC_ARRAY:
        case BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY:
                BT_ASSERT(index < bt_field_array_get_length(
-                       bt_private_field_borrow_field(base_field)));
+                       bt_private_field_as_field(base_field)));
                next_field = bt_private_field_array_borrow_element_field_by_index(
                        base_field, index);
                break;
@@ -1846,9 +1846,9 @@ update_def_clock:
        BT_ASSERT(field);
        BT_ASSERT(bt_private_field_borrow_class(field) == fc->ir_fc);
        BT_ASSERT(bt_field_get_class_type(
-               bt_private_field_borrow_field(field)) ==
+               bt_private_field_as_field(field)) ==
                BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER ||
-               bt_field_get_class_type(bt_private_field_borrow_field(field)) ==
+               bt_field_get_class_type(bt_private_field_as_field(field)) ==
                BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION);
        bt_private_field_unsigned_integer_set_value(field, value);
        stack_top(notit->stack)->index++;
@@ -1891,7 +1891,7 @@ enum bt_bfcr_status bfcr_unsigned_int_char_cb(uint64_t value,
 
        string_field = stack_top(notit->stack)->base;
        BT_ASSERT(bt_field_get_class_type(
-               bt_private_field_borrow_field(string_field)) ==
+               bt_private_field_as_field(string_field)) ==
                BT_FIELD_CLASS_TYPE_STRING);
 
        /* Append character */
@@ -1937,9 +1937,9 @@ enum bt_bfcr_status bfcr_signed_int_cb(int64_t value,
        BT_ASSERT(field);
        BT_ASSERT(bt_private_field_borrow_class(field) == fc->ir_fc);
        BT_ASSERT(bt_field_get_class_type(
-               bt_private_field_borrow_field(field)) ==
+               bt_private_field_as_field(field)) ==
                BT_FIELD_CLASS_TYPE_SIGNED_INTEGER ||
-               bt_field_get_class_type(bt_private_field_borrow_field(field)) ==
+               bt_field_get_class_type(bt_private_field_as_field(field)) ==
                BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION);
        bt_private_field_signed_integer_set_value(field, value);
        stack_top(notit->stack)->index++;
@@ -1965,7 +1965,7 @@ enum bt_bfcr_status bfcr_floating_point_cb(double value,
        BT_ASSERT(field);
        BT_ASSERT(bt_private_field_borrow_class(field) == fc->ir_fc);
        BT_ASSERT(bt_field_get_class_type(
-               bt_private_field_borrow_field(field)) ==
+               bt_private_field_as_field(field)) ==
                BT_FIELD_CLASS_TYPE_REAL);
        bt_private_field_real_set_value(field, value);
        stack_top(notit->stack)->index++;
@@ -1990,7 +1990,7 @@ enum bt_bfcr_status bfcr_string_begin_cb(
        BT_ASSERT(field);
        BT_ASSERT(bt_private_field_borrow_class(field) == fc->ir_fc);
        BT_ASSERT(bt_field_get_class_type(
-               bt_private_field_borrow_field(field)) ==
+               bt_private_field_as_field(field)) ==
                BT_FIELD_CLASS_TYPE_STRING);
        ret = bt_private_field_string_clear(field);
        BT_ASSERT(ret == 0);
@@ -2097,7 +2097,7 @@ enum bt_bfcr_status bfcr_compound_begin_cb(
                        int ret;
 
                        BT_ASSERT(bt_field_get_class_type(
-                               bt_private_field_borrow_field(field)) ==
+                               bt_private_field_as_field(field)) ==
                                BT_FIELD_CLASS_TYPE_STRING);
                        notit->done_filling_string = false;
                        ret = bt_private_field_string_clear(field);
@@ -2139,7 +2139,7 @@ enum bt_bfcr_status bfcr_compound_end_cb(
 
                if (array_fc->is_text) {
                        BT_ASSERT(bt_field_get_class_type(
-                               bt_private_field_borrow_field(
+                               bt_private_field_as_field(
                                        stack_top(notit->stack)->base)) ==
                                BT_FIELD_CLASS_TYPE_STRING);
                        bt_bfcr_set_unsigned_int_cb(notit->bfcr,
@@ -2267,7 +2267,7 @@ void set_event_default_clock_value(struct bt_notif_iter *notit)
        struct bt_private_event *event =
                bt_private_notification_event_borrow_event(
                        notit->event_notif);
-       struct bt_stream_class *sc = bt_private_stream_class_borrow_stream_class(
+       struct bt_stream_class *sc = bt_private_stream_class_as_stream_class(
                notit->meta.sc->ir_sc);
 
        BT_ASSERT(event);
@@ -2345,7 +2345,7 @@ void notify_new_packet(struct bt_notif_iter *notit,
        }
 
        BT_ASSERT(notit->packet);
-       sc = bt_private_stream_class_borrow_stream_class(notit->meta.sc->ir_sc);
+       sc = bt_private_stream_class_as_stream_class(notit->meta.sc->ir_sc);
        BT_ASSERT(sc);
 
        if (bt_stream_class_packets_have_discarded_event_counter_snapshot(sc)) {
This page took 0.033354 seconds and 4 git commands to generate.