projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bt2: update bindings to make test_component_class pass
[babeltrace.git]
/
bindings
/
python
/
bt2
/
bt2
/
query_executor.py
diff --git
a/bindings/python/bt2/bt2/query_executor.py
b/bindings/python/bt2/bt2/query_executor.py
index db7db61028d73a9cce32ba19bdab2fec5b3b8663..f90bb902651cf5fb98c2b43bcab052c35068f250 100644
(file)
--- a/
bindings/python/bt2/bt2/query_executor.py
+++ b/
bindings/python/bt2/bt2/query_executor.py
@@
-26,14
+26,17
@@
import bt2
class QueryExecutor(object._SharedObject):
class QueryExecutor(object._SharedObject):
+ _get_ref = native_bt.query_executor_get_ref
+ _put_ref = native_bt.query_executor_put_ref
+
def _handle_status(self, status, gen_error_msg):
def _handle_status(self, status, gen_error_msg):
- if status == native_bt.QUERY_STATUS_AGAIN:
+ if status == native_bt.QUERY_
EXECUTOR_
STATUS_AGAIN:
raise bt2.TryAgain
raise bt2.TryAgain
- elif status == native_bt.QUERY_
STATUS_EXECUTOR
_CANCELED:
+ elif status == native_bt.QUERY_
EXECUTOR_STATUS
_CANCELED:
raise bt2.QueryExecutorCanceled
raise bt2.QueryExecutorCanceled
- elif status == native_bt.QUERY_STATUS_INVALID_OBJECT:
+ elif status == native_bt.QUERY_
EXECUTOR_
STATUS_INVALID_OBJECT:
raise bt2.InvalidQueryObject
raise bt2.InvalidQueryObject
- elif status == native_bt.QUERY_STATUS_INVALID_PARAMS:
+ elif status == native_bt.QUERY_
EXECUTOR_
STATUS_INVALID_PARAMS:
raise bt2.InvalidQueryParams
elif status < 0:
raise bt2.Error(gen_error_msg)
raise bt2.InvalidQueryParams
elif status < 0:
raise bt2.Error(gen_error_msg)
@@
-78,10
+81,7
@@
class QueryExecutor(object._SharedObject):
params = bt2.create_value(params)
params_ptr = params._ptr
params = bt2.create_value(params)
params_ptr = params._ptr
- if isinstance(component_class, bt2.component._GenericComponentClass):
- cc_ptr = component_class._ptr
- else:
- cc_ptr = component_class._cc_ptr
+ cc_ptr = component_class._component_class_ptr()
status, result_ptr = native_bt.query_executor_query(self._ptr, cc_ptr,
object, params_ptr)
status, result_ptr = native_bt.query_executor_query(self._ptr, cc_ptr,
object, params_ptr)
This page took
0.034556 seconds
and
4
git commands to generate.