projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bt2: make it work for Python 3.4
[babeltrace.git]
/
src
/
bindings
/
python
/
bt2
/
bt2
/
stream.py
diff --git
a/src/bindings/python/bt2/bt2/stream.py
b/src/bindings/python/bt2/bt2/stream.py
index fe2af8621a0421487a47de84e5f19d1ebf8081d1..334b2fa56b918c400471b30d134de42ab5d68853 100644
(file)
--- a/
src/bindings/python/bt2/bt2/stream.py
+++ b/
src/bindings/python/bt2/bt2/stream.py
@@
-23,12
+23,17
@@
from bt2 import native_bt, utils
from bt2 import object as bt2_object
from bt2 import packet as bt2_packet
from bt2 import native_bt, utils
from bt2 import object as bt2_object
from bt2 import packet as bt2_packet
-from bt2 import trace as bt2_trace
from bt2 import stream_class as bt2_stream_class
from bt2 import value as bt2_value
import bt2
from bt2 import stream_class as bt2_stream_class
from bt2 import value as bt2_value
import bt2
+def _bt2_trace():
+ from bt2 import trace as bt2_trace
+
+ return bt2_trace
+
+
class _StreamConst(bt2_object._SharedObject):
_get_ref = staticmethod(native_bt.stream_get_ref)
_put_ref = staticmethod(native_bt.stream_put_ref)
class _StreamConst(bt2_object._SharedObject):
_get_ref = staticmethod(native_bt.stream_get_ref)
_put_ref = staticmethod(native_bt.stream_put_ref)
@@
-41,7
+46,7
@@
class _StreamConst(bt2_object._SharedObject):
)
_borrow_trace_ptr = staticmethod(native_bt.stream_borrow_trace_const)
_stream_class_pycls = bt2_stream_class._StreamClassConst
)
_borrow_trace_ptr = staticmethod(native_bt.stream_borrow_trace_const)
_stream_class_pycls = bt2_stream_class._StreamClassConst
- _trace_pycls =
bt2_trace._TraceConst
+ _trace_pycls =
property(lambda _: _bt2_trace()._TraceConst)
@property
def cls(self):
@property
def cls(self):
@@
-79,7
+84,7
@@
class _Stream(_StreamConst):
)
_borrow_trace_ptr = staticmethod(native_bt.stream_borrow_trace)
_stream_class_pycls = bt2_stream_class._StreamClass
)
_borrow_trace_ptr = staticmethod(native_bt.stream_borrow_trace)
_stream_class_pycls = bt2_stream_class._StreamClass
- _trace_pycls =
bt2_trace._Trace
+ _trace_pycls =
property(lambda _: _bt2_trace()._Trace)
def create_packet(self):
if not self.cls.supports_packets:
def create_packet(self):
if not self.cls.supports_packets:
This page took
0.029096 seconds
and
4
git commands to generate.