tap-driver.sh: flush stdout after each test result
[babeltrace.git] / bindings / python / bt2 / bt2 / native_bt.i
index b1e2d27df70382341801768cd98dc0ab918401d8..8a43edf0ce80bff4eb63611375945e63417c7933 100644 (file)
@@ -32,9 +32,9 @@
 #define BT_LOG_TAG "PY-NATIVE"
 #include "logging.h"
 
-#include <babeltrace/babeltrace.h>
-#include <babeltrace/property.h>
-#include <babeltrace/assert-internal.h>
+#include <babeltrace2/babeltrace.h>
+#include <babeltrace2/property.h>
+#include <babeltrace2/assert-internal.h>
 
 typedef const uint8_t *bt_uuid;
 %}
@@ -52,8 +52,16 @@ typedef int bt_bool;
 %rename("%(strip:[bt_])s", %$isvariable) "";
 %rename("%(strip:[BT_])s", %$isenumitem) "";
 
-/* Output argument typemap for string output (always appends) */
-%typemap(in, numinputs=0) (const char **OUT) (char *temp_value) {
+/*
+ * Output argument typemap for string output (always appends)
+ *
+ * We initialize the output parameter `temp_value` to an invalid but non-zero
+ * pointer value.  This is to make sure we don't rely on its initial value in
+ * the epilogue (where we call SWIG_Python_str_FromChar).  When they fail,
+ * functions on which we apply this typemap don't guarantee that the value of
+ * `temp_value` will be unchanged or valid.
+ */
+%typemap(in, numinputs=0) (const char **OUT) (char *temp_value = (void *) 1) {
        $1 = &temp_value;
 }
 
This page took 0.0241 seconds and 4 git commands to generate.