lib: make public reference count functions have strict types
[babeltrace.git] / include / babeltrace / graph / query-executor-const.h
index 7da47da06bf408ec6b37bc35021efcf6e739f023..d2e846cedf7ad25824afce8b054c1c53773027c9 100644 (file)
@@ -47,6 +47,25 @@ extern
 bt_bool bt_query_executor_is_canceled(
                const struct bt_query_executor *query_executor);
 
+extern void bt_query_executor_get_ref(
+               const struct bt_query_executor *query_executor);
+
+extern void bt_query_executor_put_ref(
+               const struct bt_query_executor *query_executor);
+
+#define BT_QUERY_EXECUTOR_PUT_REF_AND_RESET(_var)              \
+       do {                                                    \
+               bt_query_executor_put_ref(_var);                \
+               (_var) = NULL;                                  \
+       } while (0)
+
+#define BT_QUERY_EXECUTOR_MOVE_REF(_var_dst, _var_src)         \
+       do {                                                    \
+               bt_query_executor_put_ref(_var_dst);            \
+               (_var_dst) = (_var_src);                        \
+               (_var_src) = NULL;                              \
+       } while (0)
+
 #ifdef __cplusplus
 }
 #endif
This page took 0.022624 seconds and 4 git commands to generate.