Fix: headers: make static inline upcasts compatible with C++
[babeltrace.git] / include / babeltrace / graph / port-output-const.h
index 19a5db51c1d20cc18d3a81acb63b15387fa19865..0afa640fe84db23c504951d92734cdcbcfdd6daf 100644 (file)
@@ -24,7 +24,7 @@
  * SOFTWARE.
  */
 
-/* For bt_port, bt_port_output */
+/* For bt_port, bt_port_output, __BT_UPCAST_CONST */
 #include <babeltrace/types.h>
 
 #include <stdint.h>
@@ -36,7 +36,7 @@ extern "C" {
 static inline
 const bt_port *bt_port_output_as_port_const(const bt_port_output *port_output)
 {
-       return (const void *) port_output;
+       return __BT_UPCAST_CONST(bt_port, port_output);
 }
 
 extern void bt_port_output_get_ref(const bt_port_output *port_output);
This page took 0.02399 seconds and 4 git commands to generate.