aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h
diff options
context:
space:
mode:
authorMed Ismail Bennani <medismail.bennani@gmail.com>2022-12-16 06:26:55 -0800
committerMed Ismail Bennani <medismail.bennani@gmail.com>2023-01-12 12:49:05 -0800
commit3fbc89048517e7152cce763db3b1e5738d558113 (patch)
tree92319b9ae3eb52b77c8fcf90801a199a27a278bb /lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h
parentd9f4d1b048520c50ca06e24b7886d77d3bb2fc29 (diff)
downloadllvm-3fbc89048517e7152cce763db3b1e5738d558113.zip
llvm-3fbc89048517e7152cce763db3b1e5738d558113.tar.gz
llvm-3fbc89048517e7152cce763db3b1e5738d558113.tar.bz2
[lldb/Interpreter] Improve ScriptedPythonInterface::GetStatusFromMethod
This patch makes `ScriptedPythonInterface::GetStatusFromMethod` take a parameter pack as an argument. That will allow it to pass arbitrary arguments to the python method. Differential Revision: https://reviews.llvm.org/D139248 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h
index cc936e0..01dc07b 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h
@@ -100,7 +100,13 @@ protected:
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