Fix: headers: make static inline upcasts compatible with C++
[babeltrace.git] / include / babeltrace / graph / port-input-const.h
index c98972e803238565a7e39944c0ae7e2e7f0d1e59..5301769f08f5476d6b76a61b5ac4e1671905b4b5 100644 (file)
@@ -24,7 +24,7 @@
  * SOFTWARE.
  */
 
-/* For bt_port, bt_port_input */
+/* For bt_port, bt_port_input, __BT_UPCAST_CONST */
 #include <babeltrace/types.h>
 
 #include <stdint.h>
@@ -36,7 +36,7 @@ extern "C" {
 static inline
 const bt_port *bt_port_input_as_port_const(const bt_port_input *port_input)
 {
-       return (const void *) port_input;
+       return __BT_UPCAST_CONST(bt_port, port_input);
 }
 
 extern void bt_port_input_get_ref(const bt_port_input *port_input);
This page took 0.023278 seconds and 4 git commands to generate.