#include <babeltrace/trace-ir/fields-internal.h>
#include <babeltrace/trace-ir/fields.h>
#include <babeltrace/trace-ir/utils-internal.h>
-#include <babeltrace/ref.h>
+#include <babeltrace/object.h>
#include <babeltrace/trace-ir/clock-class.h>
#include <babeltrace/trace-ir/clock-class-internal.h>
#include <babeltrace/object-internal.h>
-#include <babeltrace/ref.h>
+#include <babeltrace/object.h>
#include <babeltrace/compiler-internal.h>
#include <babeltrace/endian-internal.h>
#include <babeltrace/assert-internal.h>
goto end;
error:
- BT_PUT(int_fc);
+ BT_OBJECT_PUT_REF_AND_RESET(int_fc);
end:
return (void *) int_fc;
goto end;
error:
- BT_PUT(enum_fc);
+ BT_OBJECT_PUT_REF_AND_RESET(enum_fc);
end:
return (void *) enum_fc;
goto end;
error:
- BT_PUT(real_fc);
+ BT_OBJECT_PUT_REF_AND_RESET(real_fc);
end:
return (void *) real_fc;
}
BT_LOGD_STR("Putting named field classe's field classe.");
- bt_put(named_fc->fc);
+ bt_object_put_ref(named_fc->fc);
}
static
goto end;
error:
- BT_PUT(struct_fc);
+ BT_OBJECT_PUT_REF_AND_RESET(struct_fc);
end:
return (void *) struct_fc;
named_fc = &g_array_index(container_fc->named_fcs,
struct bt_named_field_class, container_fc->named_fcs->len - 1);
named_fc->name = name_str;
- named_fc->fc = bt_get(fc);
+ named_fc->fc = bt_object_get_ref(fc);
g_hash_table_insert(container_fc->name_to_index, named_fc->name->str,
GUINT_TO_POINTER(container_fc->named_fcs->len - 1));
bt_field_class_freeze(fc);
BT_LIB_LOGD("Destroying variant field classe object: %!+F", fc);
finalize_named_field_classes_container((void *) fc);
BT_LOGD_STR("Putting selector field path.");
- bt_put(fc->selector_field_path);
+ bt_object_put_ref(fc->selector_field_path);
g_free(fc);
}
goto end;
error:
- BT_PUT(var_fc);
+ BT_OBJECT_PUT_REF_AND_RESET(var_fc);
end:
return (void *) var_fc;
{
BT_ASSERT(element_fc);
init_field_class((void *) fc, type, release_func);
- fc->element_fc = bt_get(element_fc);
+ fc->element_fc = bt_object_get_ref(element_fc);
bt_field_class_freeze(element_fc);
}
{
BT_ASSERT(array_fc);
BT_LOGD_STR("Putting element field classe.");
- bt_put(array_fc->element_fc);
+ bt_object_put_ref(array_fc->element_fc);
}
static
goto end;
error:
- BT_PUT(array_fc);
+ BT_OBJECT_PUT_REF_AND_RESET(array_fc);
end:
return (void *) array_fc;
BT_LIB_LOGD("Destroying dynamic array field classe object: %!+F", fc);
finalize_array_field_class((void *) fc);
BT_LOGD_STR("Putting length field path.");
- bt_put(fc->length_field_path);
+ bt_object_put_ref(fc->length_field_path);
g_free(fc);
}
goto end;
error:
- BT_PUT(array_fc);
+ BT_OBJECT_PUT_REF_AND_RESET(array_fc);
end:
return (void *) array_fc;
goto end;
error:
- BT_PUT(string_fc);
+ BT_OBJECT_PUT_REF_AND_RESET(string_fc);
end:
return (void *) string_fc;