projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bt2: field.py: add `_count` method to `_VariantField`
[babeltrace.git]
/
src
/
bindings
/
python
/
bt2
/
bt2
/
field.py
diff --git
a/src/bindings/python/bt2/bt2/field.py
b/src/bindings/python/bt2/bt2/field.py
index 4d31f8fa064517795ba0354399cea18c0301381c..7d5fdd83e1726a992d8dcb72e797cf63db0a3bfd 100644
(file)
--- a/
src/bindings/python/bt2/bt2/field.py
+++ b/
src/bindings/python/bt2/bt2/field.py
@@
-559,6
+559,9
@@
class _OptionField(_Field):
class _VariantField(_ContainerField, _Field):
_NAME = 'Variant'
+ def _count(self):
+ return len(self.cls)
+
@property
def selected_option_index(self):
return native_bt.field_variant_get_selected_option_field_index(self._ptr)
This page took
0.022871 seconds
and
4
git commands to generate.