aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-07-04 19:20:19 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-04-09 14:54:45 +0000
commit255d6c9fe5a7577c6caf78004034f2555bd0cba0 (patch)
treeb5136fa6092bd88d67f3f8e83405ec6fe0144c66 /contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp
parenta0b3fbe4ccb6961765d2325bb2ecae6ff2111102 (diff)
Diffstat (limited to 'contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp')
-rw-r--r--contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp b/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp
index 07bf952bf840..d5c527c61a5c 100644
--- a/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp
+++ b/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp
@@ -8,7 +8,6 @@
#include "lldb/Host/Config.h"
#include "lldb/Utility/Log.h"
-#include "lldb/Utility/Logging.h"
#include "lldb/lldb-enumerations.h"
#if LLDB_ENABLE_PYTHON
@@ -36,6 +35,14 @@ ScriptedPythonInterface::GetStatusFromMethod(llvm::StringRef method_name) {
}
template <>
+StructuredData::ArraySP
+ScriptedPythonInterface::ExtractValueFromPythonObject<StructuredData::ArraySP>(
+ python::PythonObject &p, Status &error) {
+ python::PythonList result_list(python::PyRefType::Borrowed, p.get());
+ return result_list.CreateStructuredArray();
+}
+
+template <>
StructuredData::DictionarySP
ScriptedPythonInterface::ExtractValueFromPythonObject<
StructuredData::DictionarySP>(python::PythonObject &p, Status &error) {