From df392b518b7e187f72c036a611feca75ea8b796b Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 1 Aug 2025 15:27:14 -0700 Subject: [lldb] Reimplment PyRun_String using the Python stable C API (#151761) Reimplement `PyRun_String` using `Py_CompileString` and` PyEval_EvalCode`, which are part of the stable C API. Part of #151617 --- lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h index 88c1bb7..6a5dd43 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -194,8 +194,8 @@ template struct PassthroughFormat { }; template <> struct PythonFormat : PassthroughFormat {}; -template <> struct PythonFormat : - PassthroughFormat {}; +template <> +struct PythonFormat : PassthroughFormat {}; template <> struct PythonFormat : PassthroughFormat {}; template <> struct PythonFormat : PassthroughFormat {}; @@ -780,6 +780,9 @@ private: operator=(const StructuredPythonObject &) = delete; }; +PyObject *RunString(const char *str, int start, PyObject *globals, + PyObject *locals); + } // namespace python } // namespace lldb_private -- cgit v1.1