From d87c80bd46d9dc761b048cad48838a039cff214a Mon Sep 17 00:00:00 2001 From: Ebuka Ezike Date: Wed, 29 Oct 2025 18:22:54 +0000 Subject: [lldb] Do not narrow `GetIndexOfChildWithName` return type to int (#165453) Modify the python wrapper to return uint32_t, which prevents incorrect child name-to-index mapping and avoids performing redundant operations on non-existent SBValues. --- lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h index 7b39d29..27f5d2e 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h @@ -158,8 +158,9 @@ public: static PyObject *LLDBSwigPython_GetChildAtIndex(PyObject *implementor, uint32_t idx); - static int LLDBSwigPython_GetIndexOfChildWithName(PyObject *implementor, - const char *child_name); + static uint32_t + LLDBSwigPython_GetIndexOfChildWithName(PyObject *implementor, + const char *child_name); static lldb::ValueObjectSP LLDBSWIGPython_GetValueObjectSPFromSBValue(void *data); -- cgit v1.1