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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 27 Jun 2019 03:09:07 +0000 (23:09 -0400)
commitd6bb425cb358e7b0db1873209e40a7d3cd7b5905
tree489cc77502b8f3a6694a67a3f6c88ff089c14ba8
parent510400a9feefbca30a23190dfd80562a834eb347
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.027557 seconds and 4 git commands to generate.