python: make all _get_ref/_put_ref proper static methods
[babeltrace.git] / src / bindings / python / bt2 / bt2 / interrupter.py
index 539f99909cadb7a91dbef7dcb8d9bb89c06ec439..6026097cb78ce96b5afa32400f0f0c143f013c82 100644 (file)
@@ -7,14 +7,19 @@ import bt2
 
 
 class Interrupter(object._SharedObject):
-    _get_ref = staticmethod(native_bt.interrupter_get_ref)
-    _put_ref = staticmethod(native_bt.interrupter_put_ref)
+    @staticmethod
+    def _get_ref(ptr):
+        native_bt.interrupter_get_ref(ptr)
+
+    @staticmethod
+    def _put_ref(ptr):
+        native_bt.interrupter_put_ref(ptr)
 
     def __init__(self):
         ptr = native_bt.interrupter_create()
 
         if ptr is None:
-            raise bt2._MemoryError('cannot create interrupter object')
+            raise bt2._MemoryError("cannot create interrupter object")
 
         super().__init__(ptr)
 
This page took 0.023605 seconds and 4 git commands to generate.