bt2: use SWIG_AppendOutput (fix for SWIG 4.3.0)
authorJitka Plesnikova <jplesnik@redhat.com>
Mon, 14 Oct 2024 12:17:10 +0000 (12:17 +0000)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 17 Oct 2024 04:02:41 +0000 (00:02 -0400)
commitba49ae6bb3646e7b257abbb85067a27885ad21a3
tree3ff7384f5193bb0a5923cd05a0b5fb5c30a554a3
parentfe60d0d40428e0b7156158c186dbf80002987ae4
bt2: use SWIG_AppendOutput (fix for SWIG 4.3.0)

From the SWIG release notes:

  [Python] #2907 Fix returning null from functions with output
  parameters.  Ensures OUTPUT and INOUT typemaps are handled
  consistently wrt return type.

  New declaration of SWIG_Python_AppendOutput is now:

    SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void);

  The 3rd parameter is new and the new $isvoid special variable
  should be passed to it, indicating whether or not the wrapped
  function returns void. If SWIG_Python_AppendOutput is currently being
  used and a completely backwards compatible (but technically incorrect)
  solution is required, then pass 1 for the is_void parameter.

  Also consider replacing with:

    SWIG_AppendOutput(PyObject* result, PyObject* obj);

  which calls SWIG_Python_AppendOutput with same parameters but adding $isvoid
  for final parameter.

Change-Id: I0944116fa40e024785d48e0b172ab30f359f505c
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/13345
CI-Build: Simon Marchi <simon.marchi@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
src/bindings/python/bt2/bt2/native_bt.i
src/bindings/python/bt2/bt2/native_bt_component.i
src/bindings/python/bt2/bt2/native_bt_event_class.i
src/bindings/python/bt2/bt2/native_bt_field_class.i
src/bindings/python/bt2/bt2/native_bt_graph.i
src/bindings/python/bt2/bt2/native_bt_message.i
src/bindings/python/bt2/bt2/native_bt_message_iterator.i
src/bindings/python/bt2/bt2/native_bt_plugin.i
This page took 0.027565 seconds and 4 git commands to generate.