projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
python: make all _get_ref/_put_ref proper static methods
[babeltrace.git]
/
src
/
bindings
/
python
/
bt2
/
bt2
/
plugin.py
diff --git
a/src/bindings/python/bt2/bt2/plugin.py
b/src/bindings/python/bt2/bt2/plugin.py
index 6888cb12f33b1352d56b567f941e9800b352c59f..7d3fff91403792f1d93358a36d552eba80666906 100644
(file)
--- 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):
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)
def __len__(self):
count = native_bt.plugin_set_get_plugin_count(self._ptr)
@@
-232,8
+237,13
@@
class _PluginSinkComponentClasses(_PluginComponentClasses):
class _Plugin(object._SharedObject):
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):
@property
def name(self):
This page took
0.024569 seconds
and
4
git commands to generate.