projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add bt_common_abort() and use it instead of abort() directly
[babeltrace.git]
/
src
/
bindings
/
python
/
bt2
/
bt2
/
native_bt_trace.i.h
diff --git
a/src/bindings/python/bt2/bt2/native_bt_trace.i.h
b/src/bindings/python/bt2/bt2/native_bt_trace.i.h
index 03e6380acf2627e77197862c71a9217b7bb6bb46..4b7f790426e1468997420657a0bcfa3cf6410b08 100644
(file)
--- a/
src/bindings/python/bt2/bt2/native_bt_trace.i.h
+++ b/
src/bindings/python/bt2/bt2/native_bt_trace.i.h
@@
-32,18
+32,18
@@
trace_destroyed_listener(const bt_trace *trace, void *py_callable)
SWIGTYPE_p_bt_trace, 0);
if (!py_trace_ptr) {
BT_LOGF_STR("Failed to create a SWIG pointer object.");
SWIGTYPE_p_bt_trace, 0);
if (!py_trace_ptr) {
BT_LOGF_STR("Failed to create a SWIG pointer object.");
- abort();
+
bt_common_
abort();
}
py_res = PyObject_CallFunction(py_callable, "(O)", py_trace_ptr);
}
py_res = PyObject_CallFunction(py_callable, "(O)", py_trace_ptr);
- if (py_res) {
- BT_ASSERT(py_res == Py_None);
- } else {
- loge_exception_append_cause(
- "Trace's destruction listener (Python)",
- BT_LOG_OUTPUT_LEVEL);
+ if (!py_res) {
+ logw_exception_clear(BT_LOG_OUTPUT_LEVEL);
+ goto end;
}
}
+ BT_ASSERT(py_res == Py_None);
+
+end:
Py_DECREF(py_trace_ptr);
Py_XDECREF(py_res);
}
Py_DECREF(py_trace_ptr);
Py_XDECREF(py_res);
}
This page took
0.025565 seconds
and
4
git commands to generate.