X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bindings%2Fpython%2Fbt2%2Fbt2%2Fplugin.py;h=2d0d8b057303afa44d1e8cb0a832ac429c4b11c3;hb=2c6f8520ad68e1ca0c9554d705c39790e7d3ef5f;hp=51f9a2ed85f1b7591a693ac02e0d48bf4a0fad10;hpb=ab1bca6c7abb3bf64e9a16edc71c157cce847a38;p=babeltrace.git diff --git a/bindings/python/bt2/bt2/plugin.py b/bindings/python/bt2/bt2/plugin.py index 51f9a2ed..2d0d8b05 100644 --- a/bindings/python/bt2/bt2/plugin.py +++ b/bindings/python/bt2/bt2/plugin.py @@ -54,8 +54,8 @@ def find_plugin(name): class _PluginSet(object._SharedObject, collections.abc.Sequence): - _put_ref = native_bt.plugin_set_put_ref - _get_ref = native_bt.plugin_set_get_ref + _put_ref = staticmethod(native_bt.plugin_set_put_ref) + _get_ref = staticmethod(native_bt.plugin_set_get_ref) def __len__(self): count = native_bt.plugin_set_get_plugin_count(self._ptr) @@ -150,29 +150,29 @@ class _PluginComponentClasses(collections.abc.Mapping): class _PluginSourceComponentClasses(_PluginComponentClasses): - _component_class_count = native_bt.plugin_get_source_component_class_count - _borrow_component_class_by_name = native_bt.plugin_borrow_source_component_class_by_name_const - _borrow_component_class_by_index = native_bt.plugin_borrow_source_component_class_by_index_const + _component_class_count = staticmethod(native_bt.plugin_get_source_component_class_count) + _borrow_component_class_by_name = staticmethod(native_bt.plugin_borrow_source_component_class_by_name_const) + _borrow_component_class_by_index = staticmethod(native_bt.plugin_borrow_source_component_class_by_index_const) _comp_cls_type = native_bt.COMPONENT_CLASS_TYPE_SOURCE class _PluginFilterComponentClasses(_PluginComponentClasses): - _component_class_count = native_bt.plugin_get_filter_component_class_count - _borrow_component_class_by_name = native_bt.plugin_borrow_filter_component_class_by_name_const - _borrow_component_class_by_index = native_bt.plugin_borrow_filter_component_class_by_index_const + _component_class_count = staticmethod(native_bt.plugin_get_filter_component_class_count) + _borrow_component_class_by_name = staticmethod(native_bt.plugin_borrow_filter_component_class_by_name_const) + _borrow_component_class_by_index = staticmethod(native_bt.plugin_borrow_filter_component_class_by_index_const) _comp_cls_type = native_bt.COMPONENT_CLASS_TYPE_FILTER class _PluginSinkComponentClasses(_PluginComponentClasses): - _component_class_count = native_bt.plugin_get_sink_component_class_count - _borrow_component_class_by_name = native_bt.plugin_borrow_sink_component_class_by_name_const - _borrow_component_class_by_index = native_bt.plugin_borrow_sink_component_class_by_index_const + _component_class_count = staticmethod(native_bt.plugin_get_sink_component_class_count) + _borrow_component_class_by_name = staticmethod(native_bt.plugin_borrow_sink_component_class_by_name_const) + _borrow_component_class_by_index = staticmethod(native_bt.plugin_borrow_sink_component_class_by_index_const) _comp_cls_type = native_bt.COMPONENT_CLASS_TYPE_SINK class _Plugin(object._SharedObject): - _put_ref = native_bt.plugin_put_ref - _get_ref = native_bt.plugin_get_ref + _put_ref = staticmethod(native_bt.plugin_put_ref) + _get_ref = staticmethod(native_bt.plugin_get_ref) @property def name(self): @@ -198,7 +198,7 @@ class _Plugin(object._SharedObject): @property def version(self): - status, major, minor, patch, extra = native_bt.plugin_get_version(self._ptr) + status, major, minor, patch, extra = native_bt.plugin_get_version_wrapper(self._ptr) if status == native_bt.PROPERTY_AVAILABILITY_NOT_AVAILABLE: return