X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fplugin.py;h=7d3fff91403792f1d93358a36d552eba80666906;hp=6888cb12f33b1352d56b567f941e9800b352c59f;hb=9dee90bdad3dac00a1caff5c9a1e58fb284ee19d;hpb=e57959f4c84bbec191771a1598e270bfc19b6c7f diff --git a/src/bindings/python/bt2/bt2/plugin.py b/src/bindings/python/bt2/bt2/plugin.py index 6888cb12..7d3fff91 100644 --- a/src/bindings/python/bt2/bt2/plugin.py +++ b/src/bindings/python/bt2/bt2/plugin.py @@ -91,8 +91,13 @@ def find_plugin( class _PluginSet(object._SharedObject, collections.abc.Sequence): - _put_ref = staticmethod(native_bt.plugin_set_put_ref) - _get_ref = staticmethod(native_bt.plugin_set_get_ref) + @staticmethod + def _put_ref(ptr): + native_bt.plugin_set_put_ref(ptr) + + @staticmethod + def _get_ref(ptr): + native_bt.plugin_set_get_ref(ptr) def __len__(self): count = native_bt.plugin_set_get_plugin_count(self._ptr) @@ -232,8 +237,13 @@ class _PluginSinkComponentClasses(_PluginComponentClasses): class _Plugin(object._SharedObject): - _put_ref = staticmethod(native_bt.plugin_put_ref) - _get_ref = staticmethod(native_bt.plugin_get_ref) + @staticmethod + def _put_ref(ptr): + native_bt.plugin_put_ref(ptr) + + @staticmethod + def _get_ref(ptr): + native_bt.plugin_get_ref(ptr) @property def name(self):