The Babeltrace API only returns const field_path objects, so from the
point of view of the user, it's always const. Rename the Python object
to _FieldPathConst to reflect this. If the API ever gives access to a
non-const version of field_path, then we can introduce a _FieldPath
type again.
Change-Id: I74a2889db48d570b4b6fbc28e43f98226dc5a053
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2055
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
if ptr is None:
return
- return bt2_field_path._FieldPath._create_from_ptr_and_get_ref(ptr)
+ return bt2_field_path._FieldPathConst._create_from_ptr_and_get_ref(ptr)
class _OptionFieldClass(_OptionFieldClassConst, _FieldClass):
if ptr is None:
return
- return bt2_field_path._FieldPath._create_from_ptr_and_get_ref(ptr)
+ return bt2_field_path._FieldPathConst._create_from_ptr_and_get_ref(ptr)
class _VariantFieldClassWithSelector(
if ptr is None:
return
- return bt2_field_path._FieldPath._create_from_ptr_and_get_ref(ptr)
+ return bt2_field_path._FieldPathConst._create_from_ptr_and_get_ref(ptr)
class _DynamicArrayFieldClass(_DynamicArrayFieldClassConst, _ArrayFieldClass):
pass
-class _FieldPath(object._SharedObject, collections.abc.Iterable):
+class _FieldPathConst(object._SharedObject, collections.abc.Iterable):
_get_ref = staticmethod(native_bt.field_path_get_ref)
_put_ref = staticmethod(native_bt.field_path_put_ref)