================
@@ -831,6 +831,29 @@ bool
lldb_private::python::SWIGBridge::LLDBSwigPythonCallCommandObject(
return true;
}
+std::optional<std::string>
+lldb_private::python::SWIGBridge::LLDBSwigPythonGetRepeatCommandForScriptedCommand(PyObject
*implementor,
+ std::string &command) {
+ PyErr_Cleaner py_err_cleaner(true);
+
+ PythonObject self(PyRefType::Borrowed, implementor);
+ auto pfunc = self.ResolveName<PythonCallable>("get_repeat_command");
+ // If not implemented, repeat the exact command.
+ if (!pfunc.IsAllocated())
+ return std::nullopt;
+
+ PythonObject result;
+ PythonString command_str(command);
+ result = pfunc(command_str);
----------------
medismailben wrote:
nit:
```suggestion
PythonString command_str(command);
PythonObject result = pfunc(command_str);
```
https://github.com/llvm/llvm-project/pull/94823
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits