python: make all _get_ref/_put_ref proper static methods
[babeltrace.git] / src / bindings / python / bt2 / bt2 / trace_class.py
index f66f385527934d5348e8e83ed9aa3730396db293..7fa8fa455be1046934545276b1163282157b43bb 100644 (file)
@@ -24,8 +24,14 @@ def _trace_class_destruction_listener_from_native(
 
 
 class _TraceClassConst(object._SharedObject, collections.abc.Mapping):
-    _get_ref = staticmethod(native_bt.trace_class_get_ref)
-    _put_ref = staticmethod(native_bt.trace_class_put_ref)
+    @staticmethod
+    def _get_ref(ptr):
+        native_bt.trace_class_get_ref(ptr)
+
+    @staticmethod
+    def _put_ref(ptr):
+        native_bt.trace_class_put_ref(ptr)
+
     _borrow_stream_class_ptr_by_index = staticmethod(
         native_bt.trace_class_borrow_stream_class_by_index_const
     )
This page took 0.023497 seconds and 4 git commands to generate.