bt2: replace copy of headers for SWIG with includes
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 21 Jun 2019 22:37:24 +0000 (18:37 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 18 Jul 2019 15:53:33 +0000 (11:53 -0400)
commite4b56bb9b7a459b227c4bb124638b0cc8b95718c
tree5b70939fa54683eecf8eb8c8c4804de2cfc88c3a
parentd82fa4c1a29fd3f656c9a1ff33912c27963d84ab
bt2: replace copy of headers for SWIG with includes

The current approach of writing SWIG interface files is to copy paste
declarations.  This can be tedious and error prone, when the API is
modified.

This patch changes the interface files to include the Babeltrace header
files containing those declarations instead.

The main difficulty with this is that we can't rely on parameter names
for typemap matching anymore.  In most cases, using just the type is
fine (e.g. the only reason a function takes a
bt_self_component_port_input ** is as an output parameter).

In the case of "user data" it's a bit more tricky, since the type is
"void *".  In these cases (in native_bt_component.i and
native_bt_port.i), I made it so we clear the typemap at the end of the
file, so hopefully it doesn't apply to an unexpected function in another
file.

In native_bt_field_class.i, the typemap for

    (bt_field_class_enumeration_mapping_label_array *label_array, uint64_t *count)

doesn't work if I leave out the parameter names, for some reason, so I
have put the parameter names used in the headers.

Change-Id: I2e98c60c2dcb7c8ea243b4cf36e0fcfaf53e9cde
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1531
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
CI-Build: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
24 files changed:
src/bindings/python/bt2/bt2/native_bt.i
src/bindings/python/bt2/bt2/native_bt_clock_class.i
src/bindings/python/bt2/bt2/native_bt_clock_snapshot.i
src/bindings/python/bt2/bt2/native_bt_component.i
src/bindings/python/bt2/bt2/native_bt_component_class.i
src/bindings/python/bt2/bt2/native_bt_connection.i
src/bindings/python/bt2/bt2/native_bt_event.i
src/bindings/python/bt2/bt2/native_bt_event_class.i
src/bindings/python/bt2/bt2/native_bt_field.i
src/bindings/python/bt2/bt2/native_bt_field_class.i
src/bindings/python/bt2/bt2/native_bt_field_path.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_notifier.i
src/bindings/python/bt2/bt2/native_bt_packet.i
src/bindings/python/bt2/bt2/native_bt_plugin.i
src/bindings/python/bt2/bt2/native_bt_port.i
src/bindings/python/bt2/bt2/native_bt_query_exec.i
src/bindings/python/bt2/bt2/native_bt_stream.i
src/bindings/python/bt2/bt2/native_bt_stream_class.i
src/bindings/python/bt2/bt2/native_bt_trace.i
src/bindings/python/bt2/bt2/native_bt_trace_class.i
src/bindings/python/bt2/bt2/native_bt_value.i
src/bindings/python/bt2/setup.py.in
This page took 0.027876 seconds and 4 git commands to generate.