summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@gmail.com>2007-10-31 18:04:22 -0700
committerSteve Reinhardt <stever@gmail.com>2007-10-31 18:04:22 -0700
commit4b49bd47f464fb3fe31a943b913edb565fa68423 (patch)
tree34cea1a1e0ed0365bcd6b64ed0c2510ed37ca00c /src/sim
parent71b033f4dcd2b34a01256139e280489b8f0f69ee (diff)
downloadgem5-4b49bd47f464fb3fe31a943b913edb565fa68423.tar.xz
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
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/main.cc6
1 files changed, 3 insertions, 3 deletions
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<char*>("__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<char*>(python_home));
// initialize embedded Python interpreter
Py_Initialize();