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:
This page took 0.026788 seconds and 4 git commands to generate.