projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: force user to include `<babeltrace2/babeltrace.h>`
[babeltrace.git]
/
src
/
bindings
/
python
/
bt2
/
bt2
/
native_bt.i
diff --git
a/src/bindings/python/bt2/bt2/native_bt.i
b/src/bindings/python/bt2/bt2/native_bt.i
index bde8d806343b8d37656308a8fe2a3124f3aaf6a6..c87a5e7280ca3300600878515df709b2a4f200dc 100644
(file)
--- a/
src/bindings/python/bt2/bt2/native_bt.i
+++ b/
src/bindings/python/bt2/bt2/native_bt.i
@@
-32,9
+32,22
@@
#define BT_LOG_TAG "BT2-PY"
#include "logging.h"
#define BT_LOG_TAG "BT2-PY"
#include "logging.h"
+/*
+ * Include before `<babeltrace2/func-status.h>` because
+ * `<babeltrace2/babeltrace.h>` removes the `__BT_IN_BABELTRACE_H`
+ * definition.
+ */
#include <babeltrace2/babeltrace.h>
#include <babeltrace2/babeltrace.h>
-#include <babeltrace2/property.h>
+
+/*
+ * This is not part of the API, but because those bindings reside within
+ * the project, we take the liberty to use them.
+ */
+#define __BT_IN_BABELTRACE_H
+#include <babeltrace2/func-status.h>
+
#include "common/assert.h"
#include "common/assert.h"
+#include "py-common/py-common.h"
typedef const uint8_t *bt_uuid;
%}
typedef const uint8_t *bt_uuid;
%}
@@
-122,14
+135,6
@@
typedef int bt_bool;
$result = SWIG_Python_AppendOutput(resultobj,
SWIG_From_unsigned_SS_long_SS_long((uint64_t) (*$1)));
}
$result = SWIG_Python_AppendOutput(resultobj,
SWIG_From_unsigned_SS_long_SS_long((uint64_t) (*$1)));
}
-/* Output argument typemap for initialized double output parameter (always appends) */
-%typemap(in, numinputs=0) (double *OUT) (double temp) {
- $1 = &temp;
-}
-
-%typemap(argout) (double *OUT) {
- $result = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*$1)));
-}
/* Input argument typemap for UUID bytes */
%typemap(in) bt_uuid {
/* Input argument typemap for UUID bytes */
%typemap(in) bt_uuid {
@@
-179,8
+184,19
@@
typedef int bt_bool;
$result = $1;
}
$result = $1;
}
+/*
+ * Define `__BT_IN_BABELTRACE_H` to allow specific headers to be
+ * included. This remains defined as long as we don't include the main
+ * header, `<babeltrace2/babeltrace.h>`.
+ */
+#define __BT_IN_BABELTRACE_H
+
+/* Property enumeration */
%include <babeltrace2/property.h>
%include <babeltrace2/property.h>
+/* Common function status codes */
+%include <babeltrace2/func-status.h>
+
/* Per-module interface files */
%include "native_bt_clock_class.i"
%include "native_bt_clock_snapshot.i"
/* Per-module interface files */
%include "native_bt_clock_class.i"
%include "native_bt_clock_snapshot.i"
@@
-195,7
+211,7
@@
typedef int bt_bool;
%include "native_bt_graph.i"
%include "native_bt_logging.i"
%include "native_bt_message.i"
%include "native_bt_graph.i"
%include "native_bt_logging.i"
%include "native_bt_message.i"
-%include "native_bt_
notifie
r.i"
+%include "native_bt_
message_iterato
r.i"
%include "native_bt_packet.i"
%include "native_bt_plugin.i"
%include "native_bt_port.i"
%include "native_bt_packet.i"
%include "native_bt_plugin.i"
%include "native_bt_port.i"
This page took
0.0253 seconds
and
4
git commands to generate.