From: Mathieu Desnoyers Date: Fri, 25 Nov 2016 22:21:08 +0000 (-0500) Subject: Cleanup: object-internal.h static inlines X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=7c56f3cc43c4a45c87a6edd3146885d7d1976856;p=deliverable%2Fbabeltrace.git Cleanup: object-internal.h static inlines Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/include/babeltrace/object-internal.h b/include/babeltrace/object-internal.h index fb37d97a3..4bf4def69 100644 --- a/include/babeltrace/object-internal.h +++ b/include/babeltrace/object-internal.h @@ -45,11 +45,14 @@ struct bt_object { }; static inline -long bt_object_get_ref_count(const void *); -static inline -void bt_object_set_parent(void *, void *); +long bt_object_get_ref_count(const void *ptr) +{ + const struct bt_object *obj = ptr; -static + return obj->ref_count.count; +} + +static inline void bt_object_release(void *ptr) { struct bt_object *obj = ptr; @@ -59,7 +62,7 @@ void bt_object_release(void *ptr) } } -static +static inline void generic_release(struct bt_object *obj) { if (obj->parent) { @@ -106,12 +109,4 @@ void bt_object_init(void *ptr, bt_object_release_func release) bt_ref_init(&obj->ref_count, generic_release); } -static inline -long bt_object_get_ref_count(const void *ptr) -{ - const struct bt_object *obj = ptr; - - return obj->ref_count.count; -} - #endif /* BABELTRACE_OBJECT_INTERNAL_H */