doc/api/libbabeltrace2/DoxygenLayout.xml: use `topics` tab
[babeltrace.git] / src / bindings / python / bt2 / bt2 / packet.py
index 9325a7d6fc29cbb0168c9651761d72f1fa2d0642..0e7605f1660d253de5a4b5423c465154f3adfcbe 100644 (file)
@@ -2,8 +2,9 @@
 #
 # Copyright (c) 2016-2017 Philippe Proulx <pproulx@efficios.com>
 
-from bt2 import native_bt, object
 from bt2 import field as bt2_field
+from bt2 import object as bt2_object
+from bt2 import native_bt
 
 
 def _bt2_stream():
@@ -12,9 +13,15 @@ def _bt2_stream():
     return bt2_stream
 
 
-class _PacketConst(object._SharedObject):
-    _get_ref = staticmethod(native_bt.packet_get_ref)
-    _put_ref = staticmethod(native_bt.packet_put_ref)
+class _PacketConst(bt2_object._SharedObject):
+    @staticmethod
+    def _get_ref(ptr):
+        native_bt.packet_get_ref(ptr)
+
+    @staticmethod
+    def _put_ref(ptr):
+        native_bt.packet_put_ref(ptr)
+
     _borrow_stream_ptr = staticmethod(native_bt.packet_borrow_stream_const)
     _borrow_context_field_ptr = staticmethod(
         native_bt.packet_borrow_context_field_const
This page took 0.023149 seconds and 4 git commands to generate.