main.cc (3202:c095cfd0da96) | main.cc (3356:39c17056dd41) |
---|---|
1/* 2 * Copyright (c) 2000-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 41 unchanged lines hidden (view full) --- 50#include "base/callback.hh" 51#include "base/inifile.hh" 52#include "base/misc.hh" 53#include "base/output.hh" 54#include "base/pollevent.hh" 55#include "base/statistics.hh" 56#include "base/str.hh" 57#include "base/time.hh" | 1/* 2 * Copyright (c) 2000-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 41 unchanged lines hidden (view full) --- 50#include "base/callback.hh" 51#include "base/inifile.hh" 52#include "base/misc.hh" 53#include "base/output.hh" 54#include "base/pollevent.hh" 55#include "base/statistics.hh" 56#include "base/str.hh" 57#include "base/time.hh" |
58#include "config/pythonhome.hh" |
|
58#include "cpu/base.hh" 59#include "cpu/smt.hh" 60#include "mem/mem_object.hh" 61#include "mem/port.hh" 62#include "sim/async.hh" 63#include "sim/builder.hh" 64#include "sim/host.hh" 65#include "sim/serialize.hh" --- 74 unchanged lines hidden (view full) --- 140 if (oldpath != NULL) { 141 pythonpath += ":"; 142 pythonpath += oldpath; 143 } 144 145 if (setenv("PYTHONPATH", pythonpath.c_str(), true) == -1) 146 fatal("setenv: %s\n", strerror(errno)); 147 | 59#include "cpu/base.hh" 60#include "cpu/smt.hh" 61#include "mem/mem_object.hh" 62#include "mem/port.hh" 63#include "sim/async.hh" 64#include "sim/builder.hh" 65#include "sim/host.hh" 66#include "sim/serialize.hh" --- 74 unchanged lines hidden (view full) --- 141 if (oldpath != NULL) { 142 pythonpath += ":"; 143 pythonpath += oldpath; 144 } 145 146 if (setenv("PYTHONPATH", pythonpath.c_str(), true) == -1) 147 fatal("setenv: %s\n", strerror(errno)); 148 |
149 char *python_home = getenv("PYTHONHOME"); 150 if (!python_home) 151 python_home = PYTHONHOME; 152 Py_SetPythonHome(python_home); 153 |
|
148 // initialize embedded Python interpreter 149 Py_Initialize(); 150 PySys_SetArgv(argc, argv); 151 152 // initialize SWIG 'cc_main' module 153 init_cc_main(); 154 155 PyRun_SimpleString("import m5.main"); --- 316 unchanged lines hidden --- | 154 // initialize embedded Python interpreter 155 Py_Initialize(); 156 PySys_SetArgv(argc, argv); 157 158 // initialize SWIG 'cc_main' module 159 init_cc_main(); 160 161 PyRun_SimpleString("import m5.main"); --- 316 unchanged lines hidden --- |