[lttng-dev] [PATCH babeltrace] bindings/python/babeltrace.i.in: don't use a return code in _bt_ctf_stream_append_discarded_events()
Sebastian Andrzej Siewior
bigeasy at linutronix.de
Tue May 27 04:08:13 EDT 2014
that function is defined as void:
| File "/usr/lib/python3/dist-packages/babeltrace.py", line 2284, in
| append_discarded_events
| if ret < 0:
| TypeError: unorderable types: NoneType() < int()
Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
---
bindings/python/babeltrace.i.in | 4 +---
include/babeltrace/ctf-writer/stream.h | 1 -
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/bindings/python/babeltrace.i.in b/bindings/python/babeltrace.i.in
index 9fda6b9..0f81c40 100644
--- a/bindings/python/babeltrace.i.in
+++ b/bindings/python/babeltrace.i.in
@@ -2100,9 +2100,7 @@ void bt_ctf_writer_put(struct bt_ctf_writer *writer);
Increase the current packet's discarded event count.
"""
def append_discarded_events(self, event_count):
- ret = _bt_ctf_stream_append_discarded_events(self._s, event_count)
- if ret < 0:
- raise ValueError("Could not append discarded events.")
+ _bt_ctf_stream_append_discarded_events(self._s, event_count)
"""
Append "event" to the stream's current packet. The stream's associated clock
diff --git a/include/babeltrace/ctf-writer/stream.h b/include/babeltrace/ctf-writer/stream.h
index 9229f77..22fb697 100644
--- a/include/babeltrace/ctf-writer/stream.h
+++ b/include/babeltrace/ctf-writer/stream.h
@@ -111,7 +111,6 @@ extern void bt_ctf_stream_class_put(struct bt_ctf_stream_class *stream_class);
* @param event_count Number of discarded events to add to the stream's current
* packet.
*
- * Returns 0 on success, a negative value on error.
*/
extern void bt_ctf_stream_append_discarded_events(struct bt_ctf_stream *stream,
uint64_t event_count);
--
2.0.0.rc4
More information about the lttng-dev
mailing list