move the swig initialization calls from src/sim/main.cc to

src/python/swig/init.cc so that it's not as easy to forget
about it when you add a new swig module.

--HG--
extra : convert_revision : 5cc4ec0838e636aa761901effb8986de58d23e03
This commit is contained in:
Nathan Binkert
2006-12-21 15:49:16 -08:00
parent 9aecfb3e3b
commit 2cb2b50802
3 changed files with 39 additions and 7 deletions

View File

@@ -60,6 +60,7 @@
#include "cpu/smt.hh"
#include "mem/mem_object.hh"
#include "mem/port.hh"
#include "python/swig/init.hh"
#include "sim/async.hh"
#include "sim/builder.hh"
#include "sim/host.hh"
@@ -117,11 +118,6 @@ abortHandler(int sigtype)
#endif
}
extern "C" {
void init_main();
void init_debug();
}
int
main(int argc, char **argv)
{
@@ -159,8 +155,7 @@ main(int argc, char **argv)
PySys_SetArgv(argc, argv);
// initialize SWIG modules
init_main();
init_debug();
init_swig();
PyRun_SimpleString("import m5.main");
PyRun_SimpleString("m5.main.main()");