[Lldb-commits] [lldb] r105737 - in /lldb/trunk: include/lldb/Interpreter/ScriptInterpreterPython.h source/Interpreter/ScriptInterpreterPython.cpp
Eli Friedman
eli.friedman at gmail.com
Wed Jun 9 11:31:39 PDT 2010
Author: efriedma
Date: Wed Jun 9 13:31:38 2010
New Revision: 105737
URL: http://llvm.org/viewvc/llvm-project?rev=105737&view=rev
Log:
Don't include Python.h in the shared header.
Modified:
lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h
lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
Modified: lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h?rev=105737&r1=105736&r2=105737&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h (original)
+++ lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h Wed Jun 9 13:31:38 2010
@@ -14,8 +14,6 @@
#include "lldb/Interpreter/ScriptInterpreter.h"
#include "lldb/Core/InputReader.h"
-#include <Python.h>
-
namespace lldb_private {
class ScriptInterpreterPython : public ScriptInterpreter
@@ -75,7 +73,7 @@
const char *bytes,
size_t bytes_len);
- PyObject *m_compiled_module;
+ void *m_compiled_module;
struct termios m_termios;
bool m_termios_valid;
};
Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=105737&r1=105736&r2=105737&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Wed Jun 9 13:31:38 2010
@@ -179,7 +179,7 @@
PyObject *compiled_module = Py_CompileString (embedded_interpreter_string, "embedded_interpreter.py",
Py_file_input);
- m_compiled_module = compiled_module;
+ m_compiled_module = static_cast<void*>(compiled_module);
init_lldb ();
@@ -196,7 +196,9 @@
const char *pty_slave_name = GetScriptInterpreterPtyName ();
FILE *out_fh = Debugger::GetSharedInstance().GetOutputFileHandle();
- PyObject *pmod = PyImport_ExecCodeModule((char *)"embedded_interpreter", m_compiled_module);
+ PyObject *pmod = PyImport_ExecCodeModule(
+ const_cast<char*>("embedded_interpreter"),
+ static_cast<PyObject*>(m_compiled_module));
if (pmod != NULL)
{
PyRun_SimpleString ("ConsoleDict = locals()");
More information about the lldb-commits
mailing list