* SOFTWARE.
*/
-/* For enum bt_self_component_port_status */
-#include <babeltrace/graph/self-component-port.h>
+/*
+ * For bt_port_input, bt_self_component_port,
+ * bt_self_component_port_input, __BT_UPCAST, __BT_UPCAST_CONST
+ */
+#include <babeltrace/types.h>
#ifdef __cplusplus
extern "C" {
#endif
-struct bt_port_input;
-struct bt_self_component_port;
-struct bt_self_component_port_input;
-
static inline
-struct bt_self_component_port *
+bt_self_component_port *
bt_self_component_port_input_as_self_component_port(
- struct bt_self_component_port_input *self_component_port)
+ bt_self_component_port_input *self_component_port)
{
- return (void *) self_component_port;
+ return __BT_UPCAST(bt_self_component_port, self_component_port);
}
static inline
-const struct bt_port_input *bt_self_component_port_input_as_port_input(
- const struct bt_self_component_port_input *self_component_port)
+const bt_port_input *bt_self_component_port_input_as_port_input(
+ const bt_self_component_port_input *self_component_port)
{
- return (const void *) self_component_port;
+ return __BT_UPCAST_CONST(bt_port_input, self_component_port);
}
#ifdef __cplusplus