X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fself-component-port-output.h;h=fee38aa84cc58211fadb4fed4da15f98c61302a6;hb=005f1204d7620018bb2c1406b6194940f0ee119f;hp=6857f3e84604a3245484688a6415c47866ca6bfe;hpb=707b7d3548cc010d582f7faed43630aed26508fd;p=babeltrace.git diff --git a/include/babeltrace/graph/self-component-port-output.h b/include/babeltrace/graph/self-component-port-output.h index 6857f3e8..fee38aa8 100644 --- a/include/babeltrace/graph/self-component-port-output.h +++ b/include/babeltrace/graph/self-component-port-output.h @@ -2,7 +2,7 @@ #define BABELTRACE_GRAPH_SELF_COMPONENT_PORT_OUTPUT_H /* - * Copyright 2017 Philippe Proulx + * Copyright 2017-2018 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,30 +23,29 @@ * SOFTWARE. */ -/* For enum bt_self_component_port_status */ -#include +/* + * For bt_port_output, bt_self_component_port, + * bt_self_component_port_output, __BT_UPCAST, __BT_UPCAST_CONST + */ +#include #ifdef __cplusplus extern "C" { #endif -struct bt_port_output; -struct bt_self_component_port; -struct bt_self_component_port_output; - static inline -struct bt_self_component_port * +bt_self_component_port * bt_self_component_port_output_as_self_component_port( - struct bt_self_component_port_output *self_component_port) + bt_self_component_port_output *self_component_port) { - return (void *) self_component_port; + return __BT_UPCAST(bt_self_component_port, self_component_port); } static inline -struct bt_port_output *bt_self_component_port_output_as_port_output( - struct bt_self_component_port_output *self_component_port) +const bt_port_output *bt_self_component_port_output_as_port_output( + bt_self_component_port_output *self_component_port) { - return (void *) self_component_port; + return __BT_UPCAST_CONST(bt_port_output, self_component_port); } #ifdef __cplusplus