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 PP |
9 | |
10 | void *bt_ctf_object_get_ref(void *obj) | |
11 | { | |
91d81473 | 12 | if (G_UNLIKELY(!obj)) { |
e1e02a22 PP |
13 | goto end; |
14 | } | |
15 | ||
16 | bt_ctf_object_get_no_null_check(obj); | |
17 | ||
18 | end: | |
19 | return obj; | |
20 | } | |
21 | ||
22 | void bt_ctf_object_put_ref(void *obj) | |
23 | { | |
91d81473 | 24 | if (G_UNLIKELY(!obj)) { |
e1e02a22 PP |
25 | return; |
26 | } | |
27 | ||
28 | bt_ctf_object_put_no_null_check(obj); | |
29 | } |