From: Antoine Busque Date: Mon, 2 May 2016 19:50:02 +0000 (-0400) Subject: Python bindings: add has_intersection property to TraceCollection X-Git-Tag: v1.4.0-rc1~28 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=54d1c81f52d1f8ac081a4b06996cc69db9294ce6 Python bindings: add has_intersection property to TraceCollection Signed-off-by: Antoine Busque Signed-off-by: Jérémie Galarneau --- diff --git a/bindings/python/babeltrace.i.in b/bindings/python/babeltrace.i.in index a5cbcf5b..f9d2c736 100644 --- a/bindings/python/babeltrace.i.in +++ b/bindings/python/babeltrace.i.in @@ -217,6 +217,10 @@ class TraceCollection: def intersect_mode(self): return self._intersect_mode + @property + def has_intersection(self): + return _bt_python_has_intersection(self._tc) + @property def events(self): """ @@ -289,8 +293,7 @@ class TraceCollection: def _events(self, begin_pos_ptr, end_pos_ptr): if self.intersect_mode: - has_intersection = _bt_python_has_intersection(self._tc) - if not has_intersection: + if not self.has_intersection: # There are no events to provide. return