projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename "query info" to "query" everywhere, and "action" to "object"
[babeltrace.git]
/
bindings
/
python
/
bt2
/
component.py
diff --git
a/bindings/python/bt2/component.py
b/bindings/python/bt2/component.py
index ebfe12629a1f7f288ebf709d47528e5b57d36e9a..6ee1a145a9bc708263352500f3ed50a31fdde819 100644
(file)
--- a/
bindings/python/bt2/component.py
+++ b/
bindings/python/bt2/component.py
@@
-45,8
+45,8
@@
class _GenericComponentClass(object._Object):
def help(self):
return native_bt.component_class_get_help(self._ptr)
def help(self):
return native_bt.component_class_get_help(self._ptr)
- def query
_info(self, action
, params=None):
- return _query
_info(self._ptr, action
, params)
+ def query
(self, obj
, params=None):
+ return _query
(self._ptr, obj
, params)
def __call__(self, params=None, name=None):
params = bt2.create_value(params)
def __call__(self, params=None, name=None):
params = bt2.create_value(params)
@@
-202,8
+202,8
@@
def _trim_docstring(docstring):
return '\n'.join(trimmed)
return '\n'.join(trimmed)
-def _query
_info(comp_cls_ptr, action
, params):
- utils._check_str(
action
)
+def _query
(comp_cls_ptr, obj
, params):
+ utils._check_str(
obj
)
if params is None:
params_ptr = native_bt.value_null
if params is None:
params_ptr = native_bt.value_null
@@
-211,11
+211,11
@@
def _query_info(comp_cls_ptr, action, params):
params = bt2.create_value(params)
params_ptr = params._ptr
params = bt2.create_value(params)
params_ptr = params._ptr
- results_ptr = native_bt.component_class_query
_info(comp_cls_ptr, action
,
+ results_ptr = native_bt.component_class_query
(comp_cls_ptr, obj
,
params_ptr)
if results_ptr is None:
params_ptr)
if results_ptr is None:
- raise bt2.Error('cannot query info with
action "{}"'.format(action
))
+ raise bt2.Error('cannot query info with
object "{}"'.format(obj
))
if results_ptr == native_bt.value_null:
return
if results_ptr == native_bt.value_null:
return
@@
-430,13
+430,13
@@
class _UserComponentType(type):
def addr(cls):
return int(cls._cc_ptr)
def addr(cls):
return int(cls._cc_ptr)
- def query
_info
(cls, action, params=None):
- return _query
_info
(cls._cc_ptr, action, params)
+ def query(cls, action, params=None):
+ return _query(cls._cc_ptr, action, params)
- def _query_
info_
from_bt(cls, action, params):
+ def _query_from_bt(cls, action, params):
# this can raise, in which case the native call to
# this can raise, in which case the native call to
- # bt_component_class_query
_info
() returns NULL
- results = cls._query
_info
(action, params)
+ # bt_component_class_query() returns NULL
+ results = cls._query(action, params)
results = bt2.create_value(results)
if results is None:
results = bt2.create_value(results)
if results is None:
@@
-449,7
+449,7
@@
class _UserComponentType(type):
return results_addr
@staticmethod
return results_addr
@staticmethod
- def _query
_info
(action, params):
+ def _query(action, params):
# BT catches this and returns NULL to the user
raise NotImplementedError
# BT catches this and returns NULL to the user
raise NotImplementedError
This page took
0.031883 seconds
and
4
git commands to generate.