Fix: return event timestamp in _timestamp_at_pos
[babeltrace.git] / bindings / python / reader.py
index 285111e82f6f02d354a8c4f860b010450edaff4e..6758043599276d3c535708cd08054f034e22895f 100644 (file)
@@ -207,6 +207,11 @@ class TraceCollection:
         ev_ptr = nbt._bt_ctf_iter_read_event(ctf_it_ptr)
         nbt._bt_ctf_iter_destroy(ctf_it_ptr)
 
+        ev = Event.__new__(Event)
+        ev._e = ev_ptr
+
+        return ev.timestamp
+
     def _events(self, begin_pos_ptr, end_pos_ptr):
         ctf_it_ptr = nbt._bt_ctf_iter_create(self._tc, begin_pos_ptr, end_pos_ptr)
 
@@ -810,13 +815,16 @@ class IntegerFieldDeclaration(FieldDeclaration):
             return common.ByteOrder.BYTE_ORDER_UNKNOWN
 
     @property
-    def length(self):
+    def size(self):
         """
         Integer size in bits, or a negative value on error.
         """
-
         return nbt._bt_ctf_get_int_len(self._fd)
 
+    @property
+    def length(self):
+        return self.size
+
     @property
     def encoding(self):
         """
This page took 0.024186 seconds and 4 git commands to generate.