X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fstream_class.py;h=c189a6eb32cf9e6864ecc582b78039a303b83161;hp=885ba746dae01ae37b9db9ae5a0873453fe58804;hb=9dee90bdad3dac00a1caff5c9a1e58fb284ee19d;hpb=e57959f4c84bbec191771a1598e270bfc19b6c7f diff --git a/src/bindings/python/bt2/bt2/stream_class.py b/src/bindings/python/bt2/bt2/stream_class.py index 885ba746..c189a6eb 100644 --- a/src/bindings/python/bt2/bt2/stream_class.py +++ b/src/bindings/python/bt2/bt2/stream_class.py @@ -17,8 +17,14 @@ def _bt2_trace_class(): class _StreamClassConst(object._SharedObject, collections.abc.Mapping): - _get_ref = staticmethod(native_bt.stream_class_get_ref) - _put_ref = staticmethod(native_bt.stream_class_put_ref) + @staticmethod + def _get_ref(ptr): + native_bt.stream_class_get_ref(ptr) + + @staticmethod + def _put_ref(ptr): + native_bt.stream_class_put_ref(ptr) + _borrow_event_class_ptr_by_id = staticmethod( native_bt.stream_class_borrow_event_class_by_id_const ) @@ -165,8 +171,14 @@ class _StreamClassConst(object._SharedObject, collections.abc.Mapping): class _StreamClass(_StreamClassConst): - _get_ref = staticmethod(native_bt.stream_class_get_ref) - _put_ref = staticmethod(native_bt.stream_class_put_ref) + @staticmethod + def _get_ref(ptr): + native_bt.stream_class_get_ref(ptr) + + @staticmethod + def _put_ref(ptr): + native_bt.stream_class_put_ref(ptr) + _borrow_event_class_ptr_by_id = staticmethod( native_bt.stream_class_borrow_event_class_by_id )