summaryrefslogtreecommitdiff
path: root/src/python/swig
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2010-09-09 14:26:29 -0700
committerNathan Binkert <nate@binkert.org>2010-09-09 14:26:29 -0700
commit47ef97b9caad0a72751523855d145dcd96fc5738 (patch)
tree9c221cdf3826302b1a908c06ea279fe4c6d8b722 /src/python/swig
parente6ee56c6571999631ce31b05d0e563d66a7bbdd8 (diff)
downloadgem5-47ef97b9caad0a72751523855d145dcd96fc5738.tar.xz
scons: Stop building the big monolithic swigged params module
kill params.i and create a separate .i for each object (param, enums, etc.)
Diffstat (limited to 'src/python/swig')
-rw-r--r--src/python/swig/inet.i3
-rw-r--r--src/python/swig/range.i12
-rw-r--r--src/python/swig/sim_object.i3
-rw-r--r--src/python/swig/system.i7
4 files changed, 19 insertions, 6 deletions
diff --git a/src/python/swig/inet.i b/src/python/swig/inet.i
index 96b4b85d0..e92b44597 100644
--- a/src/python/swig/inet.i
+++ b/src/python/swig/inet.i
@@ -32,6 +32,9 @@
#include "base/inet.hh"
%}
+%import "stdint.i"
+%import "std_string.i"
+
namespace Net {
struct EthAddr
{
diff --git a/src/python/swig/range.i b/src/python/swig/range.i
index 659bde8d7..f0cf43be4 100644
--- a/src/python/swig/range.i
+++ b/src/python/swig/range.i
@@ -28,10 +28,18 @@
* Authors: Nathan Binkert
*/
-%rename(assign) *::operator=;
+%module(package="m5.internal") range
-%include "base/range.hh"
+%{
+#include "base/range.hh"
+#include "base/types.hh"
+%}
+
+%include "stdint.i"
%include "base/types.hh"
+%rename(assign) *::operator=;
+%include "base/range.hh"
+
%template(AddrRange) Range<Addr>;
%template(TickRange) Range<Tick>;
diff --git a/src/python/swig/sim_object.i b/src/python/swig/sim_object.i
index af9afd057..76d312417 100644
--- a/src/python/swig/sim_object.i
+++ b/src/python/swig/sim_object.i
@@ -28,8 +28,6 @@
* Authors: Nathan Binkert
*/
-%module sim_object
-
%{
#include "python/swig/pyobject.hh"
%}
@@ -39,6 +37,7 @@
%include "std_string.i"
%include "base/types.hh"
+%include "sim/sim_object_params.hh"
class BaseCPU;
diff --git a/src/python/swig/system.i b/src/python/swig/system.i
index a95101bf7..5e36b4ac5 100644
--- a/src/python/swig/system.i
+++ b/src/python/swig/system.i
@@ -28,9 +28,12 @@
* Authors: Nathan Binkert
*/
-%module sim_object
+%{
+#include "sim/system.hh"
+%}
-%include "enums/MemoryMode.hh"
+%import "python/swig/sim_object.i"
+%import "enums/MemoryMode.hh"
class System : public SimObject
{