[Lldb-commits] [lldb] 6528157 - [lldb][swig] Use the correct variable in the return statement
Dmitri Gribenko via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 21 06:29:14 PDT 2024
Author: Dmitri Gribenko
Date: 2024-08-21T15:29:03+02:00
New Revision: 65281570afd7e35e01533b07c6c2937de410fc52
URL: https://github.com/llvm/llvm-project/commit/65281570afd7e35e01533b07c6c2937de410fc52
DIFF: https://github.com/llvm/llvm-project/commit/65281570afd7e35e01533b07c6c2937de410fc52.diff
LOG: [lldb][swig] Use the correct variable in the return statement
The issue was introduced in
https://github.com/llvm/llvm-project/pull/104523.
The code introduces the `ret_val` variable but does not use it. Instead
it returns a pointer, which gets implicitly converted to bool.
Added:
Modified:
lldb/bindings/python/python-wrapper.swig
Removed:
################################################################################
diff --git a/lldb/bindings/python/python-wrapper.swig b/lldb/bindings/python/python-wrapper.swig
index 2ce42e3e017d5b..360c392235a866 100644
--- a/lldb/bindings/python/python-wrapper.swig
+++ b/lldb/bindings/python/python-wrapper.swig
@@ -837,7 +837,7 @@ bool lldb_private::python::SWIGBridge::LLDBSwigPython_ShouldHide(
bool ret_val = result ? PyObject_IsTrue(result) : false;
Py_XDECREF(result);
- return result;
+ return ret_val;
}
void *lldb_private::python::SWIGBridge::LLDBSWIGPython_GetDynamicSetting(
More information about the lldb-commits
mailing list