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(


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to