lib: Add functions to borrow specialized component classes from specialized components
[babeltrace.git] / include / babeltrace / graph / self-component.h
index c11d8e456e8230646125e05898c2af05ded0bc90..0be09442831b26e7d4e099a0bb357e3fb72e9476 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-/* For bt_component, bt_self_component */
+/* For bt_component, bt_self_component, __BT_UPCAST */
 #include <babeltrace/types.h>
 
 #ifdef __cplusplus
@@ -43,14 +43,14 @@ static inline
 const bt_component *bt_self_component_as_component(
                bt_self_component *self_component)
 {
-       return (const void *) self_component;
+       return __BT_UPCAST(bt_component, self_component);
 }
 
 extern void *bt_self_component_get_data(
-               const bt_self_component *private_component);
+               const bt_self_component *self_component);
 
 extern void bt_self_component_set_data(
-               bt_self_component *private_component, void *data);
+               bt_self_component *self_component, void *data);
 
 #ifdef __cplusplus
 }
This page took 0.024802 seconds and 4 git commands to generate.