lib: private functions: do not repeat `private` word
[babeltrace.git] / lib / graph / component-class.c
index 1df85b48f1baa0b4c79ee100c857fd13308dcc3d..5a306fb80019ad152f1ed97c83cd7819c1af5ff7 100644 (file)
@@ -31,7 +31,7 @@
 
 #include <babeltrace/compiler-internal.h>
 #include <babeltrace/graph/component-class-internal.h>
-#include <babeltrace/ref.h>
+#include <babeltrace/object.h>
 #include <babeltrace/types.h>
 #include <babeltrace/assert-internal.h>
 #include <glib.h>
@@ -84,7 +84,7 @@ int bt_component_class_init(struct bt_component_class *class,
 {
        int ret = 0;
 
-       bt_object_init(class, bt_component_class_destroy);
+       bt_object_init_shared(&class->base, bt_component_class_destroy);
        class->type = type;
        class->name = g_string_new(name);
        if (!class->name) {
@@ -114,7 +114,7 @@ int bt_component_class_init(struct bt_component_class *class,
        goto end;
 
 error:
-       BT_PUT(class);
+       BT_OBJECT_PUT_REF_AND_RESET(class);
        ret = -1;
 
 end:
This page took 0.026736 seconds and 4 git commands to generate.