[lldb/Interpreter] Make ScriptedInterface Object creation more generic (#68052)
This patch changes the way plugin objects used with Scripted Interfaces are created. Instead of implementing a different SWIG method to create the object for every scripted interface, this patch makes the creation more generic by re-using some of the ScriptedPythonInterface templated Dispatch code. This patch also improves error handling of the object creation by returning an `llvm::Expected`. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma> Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
This commit is contained in:
1 parent
7ce613fc77
commit
f22d82cef2
16 files changed
+161
-153
No files matched your search
+1
-1
@@ -23,7 +23,7 @@ class ScriptedThreadPythonInterface : public ScriptedThreadInterface,
|
||||
public:
|
||||
ScriptedThreadPythonInterface(ScriptInterpreterPythonImpl &interpreter);
|
||||
|
||||
StructuredData::GenericSP
|
||||
llvm::Expected<StructuredData::GenericSP>
|
||||
CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx,
|
||||
StructuredData::DictionarySP args_sp,
|
||||
StructuredData::Generic *script_obj = nullptr) override;
|
||||
|
||||
Reference in new issue
Block a user