Skip to content

Commit

Permalink
[lldb][swig] Use the correct variable in the return statement
Browse files Browse the repository at this point in the history
The issue was introduced in
llvm#104523.

The code introduces the `ret_val` variable but does not use it. Instead
it returns a pointer, which gets implicitly converted to bool.

(cherry picked from commit 6528157)
  • Loading branch information
gribozavr authored and Michael137 committed Sep 20, 2024
1 parent 1170ec6 commit 4b201c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lldb/bindings/python/python-wrapper.swig
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 4b201c6

Please sign in to comment.