bt2: rename `object` parameter -> `object_name`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 18 Dec 2019 02:54:38 +0000 (21:54 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 20 Jan 2020 20:15:24 +0000 (15:15 -0500)
I think it's more evident this way.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I20f80ab8b28c4f4f0d390dd9fb4676ff69e8e609
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2712
Tested-by: jenkins <jenkins@lttng.org>
src/bindings/python/bt2/bt2/component.py
src/bindings/python/bt2/bt2/query_executor.py

index 980a0d45f9f7dd42f9ca4100b38c124be978e161..9ccd64528d0dc95c96b434c553a2ab575b669a21 100644 (file)
@@ -613,7 +613,9 @@ class _UserComponentType(type):
     def _user_get_supported_mip_versions(cls, params, obj, log_level):
         return [0]
 
-    def _bt_query_from_native(cls, priv_query_exec_ptr, object, params_ptr, method_obj):
+    def _bt_query_from_native(
+        cls, priv_query_exec_ptr, object_name, params_ptr, method_obj
+    ):
         # this can raise, but the native side checks the exception
         if params_ptr is not None:
             params = bt2_value._create_from_const_ptr_and_get_ref(params_ptr)
@@ -624,7 +626,7 @@ class _UserComponentType(type):
 
         try:
             # this can raise, but the native side checks the exception
-            results = cls._user_query(priv_query_exec, object, params, method_obj)
+            results = cls._user_query(priv_query_exec, object_name, params, method_obj)
         finally:
             # the private query executor is a private view on the query
             # executor; it's not a shared object (the library does not
@@ -646,7 +648,7 @@ class _UserComponentType(type):
         bt2_value._Value._get_ref(results_ptr)
         return int(results_ptr)
 
-    def _user_query(cls, priv_query_executor, object, params, method_obj):
+    def _user_query(cls, priv_query_executor, object_name, params, method_obj):
         raise bt2.UnknownObject
 
     def _bt_component_class_ptr(self):
index 57c325890e80d0548065152dd3f0033a5b7dbd89..0b4cbc2fdcd17bf01a28d73c680131da0d3b69c0 100644 (file)
@@ -54,7 +54,7 @@ class QueryExecutor(object._SharedObject, _QueryExecutorCommon):
     def _as_query_executor_ptr(self):
         return self._ptr
 
-    def __init__(self, component_class, object, params=None, method_obj=None):
+    def __init__(self, component_class, object_name, params=None, method_obj=None):
         if not isinstance(component_class, _bt2_component()._ComponentClassConst):
             err = False
 
@@ -68,7 +68,7 @@ class QueryExecutor(object._SharedObject, _QueryExecutorCommon):
                 o = component_class
                 raise TypeError("'{}' is not a component class object".format(o))
 
-        utils._check_str(object)
+        utils._check_str(object_name)
 
         if params is None:
             params_ptr = native_bt.value_null
@@ -87,7 +87,7 @@ class QueryExecutor(object._SharedObject, _QueryExecutorCommon):
             )
 
         ptr = native_bt.bt2_query_executor_create(
-            cc_ptr, object, params_ptr, method_obj
+            cc_ptr, object_name, params_ptr, method_obj
         )
 
         if ptr is None:
This page took 0.044168 seconds and 4 git commands to generate.