diff options
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
3 files changed, 7 insertions, 6 deletions
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); diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 73c5c72..d257a08 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -1939,7 +1939,7 @@ lldb::ValueObjectSP ScriptInterpreterPythonImpl::GetChildAtIndex( return ret_val; } -llvm::Expected<int> ScriptInterpreterPythonImpl::GetIndexOfChildWithName( +llvm::Expected<uint32_t> ScriptInterpreterPythonImpl::GetIndexOfChildWithName( const StructuredData::ObjectSP &implementor_sp, const char *child_name) { if (!implementor_sp) return llvm::createStringError("Type has no child named '%s'", child_name); @@ -1951,7 +1951,7 @@ llvm::Expected<int> ScriptInterpreterPythonImpl::GetIndexOfChildWithName( if (!implementor) return llvm::createStringError("Type has no child named '%s'", child_name); - int ret_val = INT32_MAX; + uint32_t ret_val = UINT32_MAX; { Locker py_lock(this, @@ -1960,7 +1960,7 @@ llvm::Expected<int> ScriptInterpreterPythonImpl::GetIndexOfChildWithName( child_name); } - if (ret_val == INT32_MAX) + if (ret_val == UINT32_MAX) return llvm::createStringError("Type has no child named '%s'", child_name); return ret_val; } diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h index dedac28..00ae59c 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h @@ -122,7 +122,7 @@ public: GetChildAtIndex(const StructuredData::ObjectSP &implementor, uint32_t idx) override; - llvm::Expected<int> + llvm::Expected<uint32_t> GetIndexOfChildWithName(const StructuredData::ObjectSP &implementor, const char *child_name) override; |
