# Copyright (c) 2018 Francis Deslauriers <francis.deslauriers@efficios.com>
import collections
-from bt2 import native_bt, object
+from bt2 import native_bt
+from bt2 import object as bt2_object
class FieldPathScope:
pass
-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)
+class _FieldPathConst(bt2_object._SharedObject, collections.abc.Iterable):
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.field_path_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.field_path_put_ref(ptr)
@property
def root_scope(self):