From 3fbc89048517e7152cce763db3b1e5738d558113 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Fri, 16 Dec 2022 06:26:55 -0800 Subject: [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 --- .../Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h index cc936e09a6ef..01dc07b49737 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h @@ -100,7 +100,13 @@ protected: return ExtractValueFromPythonObject(py_return, error); } - Status GetStatusFromMethod(llvm::StringRef method_name); + template + Status GetStatusFromMethod(llvm::StringRef method_name, Args &&...args) { + Status error; + Dispatch(method_name, error, std::forward(args)...); + + return error; + } template T Transform(T object) { // No Transformation for generic usage -- cgit v1.2.3