projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bt2: normalize the code to use some commonly used patterns
[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..26404afb9c6714e4b808d8e10f378d2e415e6c2b 100644
(file)
--- a/
src/bindings/python/bt2/bt2/native_bt_trace.i.h
+++ b/
src/bindings/python/bt2/bt2/native_bt_trace.i.h
@@
-36,14
+36,16
@@
trace_destroyed_listener(const bt_trace *trace, void *py_callable)
}
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 {
+ if (!py_res) {
loge_exception_append_cause(
"Trace's destruction listener (Python)",
BT_LOG_OUTPUT_LEVEL);
loge_exception_append_cause(
"Trace's destruction listener (Python)",
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.026853 seconds
and
4
git commands to generate.