From 4b49bd47f464fb3fe31a943b913edb565fa68423 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Wed, 31 Oct 2007 18:04:22 -0700 Subject: String constant const-ness changes to placate g++ 4.2. Also some bug fixes in MIPS ISA uncovered by g++ warnings (Python string compares don't work in C++!). --HG-- extra : convert_revision : b347cc0108f23890e9b73b3ee96059f0cea96cf6 --- src/sim/main.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sim/main.cc') diff --git a/src/sim/main.cc b/src/sim/main.cc index 62ab9445b..baca556a0 100644 --- a/src/sim/main.cc +++ b/src/sim/main.cc @@ -82,7 +82,7 @@ python_main() PyObject *dict; PyObject *result; - module = PyImport_AddModule("__main__"); + module = PyImport_AddModule(const_cast("__main__")); if (module == NULL) fatal("Could not import __main__"); @@ -135,10 +135,10 @@ main(int argc, char **argv) if (setenv("PYTHONPATH", pythonpath.c_str(), true) == -1) fatal("setenv: %s\n", strerror(errno)); - char *python_home = getenv("PYTHONHOME"); + const char *python_home = getenv("PYTHONHOME"); if (!python_home) python_home = PYTHONHOME; - Py_SetPythonHome(python_home); + Py_SetPythonHome(const_cast(python_home)); // initialize embedded Python interpreter Py_Initialize(); -- cgit v1.2.3