Commit | Line | Data |
---|---|---|
e1e02a22 | 1 | /* |
0235b0db | 2 | * SPDX-License-Identifier: MIT |
e1e02a22 | 3 | * |
0235b0db | 4 | * Copyright (c) 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com> |
e1e02a22 PP |
5 | */ |
6 | ||
578e048b | 7 | #include "object.h" |
7c7301d5 | 8 | #include <babeltrace2-ctf-writer/object.h> |
e1e02a22 | 9 | |
1353b066 | 10 | BT_EXPORT |
e1e02a22 PP |
11 | void *bt_ctf_object_get_ref(void *obj) |
12 | { | |
91d81473 | 13 | if (G_UNLIKELY(!obj)) { |
e1e02a22 PP |
14 | goto end; |
15 | } | |
16 | ||
17 | bt_ctf_object_get_no_null_check(obj); | |
18 | ||
19 | end: | |
20 | return obj; | |
21 | } | |
22 | ||
1353b066 | 23 | BT_EXPORT |
e1e02a22 PP |
24 | void bt_ctf_object_put_ref(void *obj) |
25 | { | |
91d81473 | 26 | if (G_UNLIKELY(!obj)) { |
e1e02a22 PP |
27 | return; |
28 | } | |
29 | ||
30 | bt_ctf_object_put_no_null_check(obj); | |
31 | } |