aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/ScriptInterpreter
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/unittests/ScriptInterpreter')
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp22
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp21
2 files changed, 17 insertions, 26 deletions
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
index 2dd92fc..0d4b04b 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
@@ -632,8 +632,8 @@ TEST_F(PythonDataObjectsTest, TestCallable) {
ASSERT_FALSE(error);
{
- PyObject *o = PyRun_String("lambda x : x", Py_eval_input, globals.get(),
- globals.get());
+ PyObject *o =
+ RunString("lambda x : x", Py_eval_input, globals.get(), globals.get());
ASSERT_FALSE(o == NULL);
auto lambda = Take<PythonCallable>(o);
auto arginfo = lambda.GetArgInfo();
@@ -642,8 +642,8 @@ TEST_F(PythonDataObjectsTest, TestCallable) {
}
{
- PyObject *o = PyRun_String("lambda x,y=0: x", Py_eval_input, globals.get(),
- globals.get());
+ PyObject *o = RunString("lambda x,y=0: x", Py_eval_input, globals.get(),
+ globals.get());
ASSERT_FALSE(o == NULL);
auto lambda = Take<PythonCallable>(o);
auto arginfo = lambda.GetArgInfo();
@@ -652,8 +652,8 @@ TEST_F(PythonDataObjectsTest, TestCallable) {
}
{
- PyObject *o = PyRun_String("lambda x,y=0, **kw: x", Py_eval_input,
- globals.get(), globals.get());
+ PyObject *o = RunString("lambda x,y=0, **kw: x", Py_eval_input,
+ globals.get(), globals.get());
ASSERT_FALSE(o == NULL);
auto lambda = Take<PythonCallable>(o);
auto arginfo = lambda.GetArgInfo();
@@ -662,8 +662,8 @@ TEST_F(PythonDataObjectsTest, TestCallable) {
}
{
- PyObject *o = PyRun_String("lambda x,y,*a: x", Py_eval_input, globals.get(),
- globals.get());
+ PyObject *o = RunString("lambda x,y,*a: x", Py_eval_input, globals.get(),
+ globals.get());
ASSERT_FALSE(o == NULL);
auto lambda = Take<PythonCallable>(o);
auto arginfo = lambda.GetArgInfo();
@@ -673,8 +673,8 @@ TEST_F(PythonDataObjectsTest, TestCallable) {
}
{
- PyObject *o = PyRun_String("lambda x,y,*a,**kw: x", Py_eval_input,
- globals.get(), globals.get());
+ PyObject *o = RunString("lambda x,y,*a,**kw: x", Py_eval_input,
+ globals.get(), globals.get());
ASSERT_FALSE(o == NULL);
auto lambda = Take<PythonCallable>(o);
auto arginfo = lambda.GetArgInfo();
@@ -713,7 +713,7 @@ class NewStyle(object):
)";
PyObject *o =
- PyRun_String(script, Py_file_input, globals.get(), globals.get());
+ RunString(script, Py_file_input, globals.get(), globals.get());
ASSERT_FALSE(o == NULL);
Take<PythonObject>(o);
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
index f7b5e3a..068860e 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
@@ -22,7 +22,7 @@ void PythonTestSuite::SetUp() {
// test suite.
Py_InitializeEx(0);
m_gil_state = PyGILState_Ensure();
- PyRun_SimpleString("import sys");
+ python::RunSimpleString("import sys");
}
void PythonTestSuite::TearDown() {
@@ -80,20 +80,6 @@ lldb_private::python::SWIGBridge::LLDBSwigPythonCreateCommandObject(
return python::PythonObject();
}
-python::PythonObject lldb_private::python::SWIGBridge::
- LLDBSwigPythonCreateScriptedBreakpointResolver(
- const char *python_class_name, const char *session_dictionary_name,
- const StructuredDataImpl &args, const lldb::BreakpointSP &bkpt_sp) {
- return python::PythonObject();
-}
-
-unsigned int
-lldb_private::python::SWIGBridge::LLDBSwigPythonCallBreakpointResolver(
- void *implementor, const char *method_name,
- lldb_private::SymbolContext *sym_ctx) {
- return 0;
-}
-
size_t lldb_private::python::SWIGBridge::LLDBSwigPython_CalculateNumChildren(
PyObject *implementor, uint32_t max) {
return 0;
@@ -144,6 +130,11 @@ lldb_private::python::LLDBSWIGPython_CastPyObjectToSBStream(PyObject *data) {
return nullptr;
}
+void *lldb_private::python::LLDBSWIGPython_CastPyObjectToSBSymbolContext(
+ PyObject *data) {
+ return nullptr;
+}
+
void *
lldb_private::python::LLDBSWIGPython_CastPyObjectToSBValue(PyObject *data) {
return nullptr;