lib: use object pool for event and packet notifications
[babeltrace.git] / include / babeltrace / graph / component.h
index 7423e92a5fa3861c83360e7316adbd8187a84597..f2db9d723c1f254056937b90e1be920fe016429f 100644 (file)
@@ -33,6 +33,9 @@
 /* For bt_bool */
 #include <babeltrace/types.h>
 
+/* For bt_get */
+#include <babeltrace/ref.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -84,7 +87,13 @@ bt_bool bt_component_is_sink(struct bt_component *component)
                BT_COMPONENT_CLASS_TYPE_SINK;
 }
 
-extern struct bt_graph *bt_component_get_graph(struct bt_component *component);
+extern struct bt_graph *bt_component_borrow_graph(struct bt_component *component);
+
+static inline
+struct bt_graph *bt_component_get_graph(struct bt_component *component)
+{
+       return bt_get(bt_component_borrow_graph(component));
+}
 
 #ifdef __cplusplus
 }
This page took 0.024416 seconds and 4 git commands to generate.