[Lldb-commits] [PATCH] D139248: [lldb/Interpreter] Improve ScriptedPythonInterface::GetStatusFromMethod
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 12 12:54:24 PST 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3fbc89048517: [lldb/Interpreter] Improve ScriptedPythonInterface::GetStatusFromMethod (authored by mib).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139248/new/
https://reviews.llvm.org/D139248
Files:
lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h
Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h
===================================================================
--- lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h
+++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h
@@ -100,7 +100,13 @@
return ExtractValueFromPythonObject<T>(py_return, error);
}
- Status GetStatusFromMethod(llvm::StringRef method_name);
+ template <typename... Args>
+ Status GetStatusFromMethod(llvm::StringRef method_name, Args &&...args) {
+ Status error;
+ Dispatch<Status>(method_name, error, std::forward<Args>(args)...);
+
+ return error;
+ }
template <typename T> T Transform(T object) {
// No Transformation for generic usage
Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp
===================================================================
--- lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp
+++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp
@@ -27,14 +27,6 @@
ScriptInterpreterPythonImpl &interpreter)
: ScriptedInterface(), m_interpreter(interpreter) {}
-Status
-ScriptedPythonInterface::GetStatusFromMethod(llvm::StringRef method_name) {
- Status error;
- Dispatch<Status>(method_name, error);
-
- return error;
-}
-
template <>
StructuredData::ArraySP
ScriptedPythonInterface::ExtractValueFromPythonObject<StructuredData::ArraySP>(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139248.488744.patch
Type: text/x-patch
Size: 1481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230112/45ca6e7c/attachment.bin>
More information about the lldb-commits
mailing list