Fix: don't use a return code in _bt_ctf_stream_append_discarded_events
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 27 May 2014 08:08:13 +0000 (10:08 +0200)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 27 May 2014 20:04:00 +0000 (16:04 -0400)
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@linutronix.de>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
bindings/python/babeltrace.i.in
include/babeltrace/ctf-writer/stream.h

index 6a34e2550c1f0f5c2e9bb82c35ddf49753bc267f..c0dd3a0994424ba56dc962ac6c455904b2807f91 100644 (file)
@@ -2088,9 +2088,7 @@ class CTFWriter:
                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
index 9229f771bcceeb4b75dc4dc8b2ff9aded084aab6..df4d0c92cc19ee1b0244854df8a631ea70485a9c 100644 (file)
@@ -110,8 +110,6 @@ extern void bt_ctf_stream_class_put(struct bt_ctf_stream_class *stream_class);
  * @param stream Stream instance.
  * @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);
This page took 0.035503 seconds and 4 git commands to generate.