Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
_NAME = 'Sequence'
def _count(self):
_NAME = 'Sequence'
def _count(self):
- return self.length_field.value
+ return int(self.length_field)
@property
def length_field(self):
field_ptr = native_bt.ctf_field_sequence_get_length(self._ptr)
@property
def length_field(self):
field_ptr = native_bt.ctf_field_sequence_get_length(self._ptr)
- utils._handle_ptr("cannot get sequence field object's length field")
+ if field_ptr is None:
+ return
return _create_from_ptr(field_ptr)
@length_field.setter
return _create_from_ptr(field_ptr)
@length_field.setter