python: make all _get_ref/_put_ref proper static methods
[babeltrace.git] / src / bindings / python / bt2 / bt2 / message_iterator.py
index e2efa732baba9729f2635456341d11121717b009..670eaf80eabf2af9a6c1a9d4bd580c433564e5ff 100644 (file)
@@ -19,8 +19,13 @@ class _MessageIterator(collections.abc.Iterator):
 
 
 class _UserComponentInputPortMessageIterator(object._SharedObject, _MessageIterator):
-    _get_ref = staticmethod(native_bt.message_iterator_get_ref)
-    _put_ref = staticmethod(native_bt.message_iterator_put_ref)
+    @staticmethod
+    def _get_ref(ptr):
+        native_bt.message_iterator_get_ref(ptr)
+
+    @staticmethod
+    def _put_ref(ptr):
+        native_bt.message_iterator_put_ref(ptr)
 
     def __init__(self, ptr):
         self._current_msgs = []
This page took 0.022652 seconds and 4 git commands to generate.