changeset 146caf930da0 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=146caf930da0
description:
        swig: don't override SWIG_name anymore
        It doesn't appear to be necessary and it is somewhat odd.  I'm pretty
        sure that the package parameter to %module does whatever this might
        have been before.  It's necessary in future revisions anyway.

diffstat:

 src/python/swig/core.i   |  7 +------
 src/python/swig/debug.i  |  8 +-------
 src/python/swig/event.i  |  8 +-------
 src/python/swig/random.i |  8 +-------
 src/python/swig/stats.i  |  8 +-------
 src/python/swig/trace.i  |  8 +-------
 6 files changed, 6 insertions(+), 41 deletions(-)

diffs (131 lines):

diff -r f6e808dd36af -r 146caf930da0 src/python/swig/core.i
--- a/src/python/swig/core.i    Thu Sep 09 14:40:19 2010 -0400
+++ b/src/python/swig/core.i    Thu Sep 09 14:15:40 2010 -0700
@@ -29,7 +29,7 @@
  *          Steve Reinhardt
  */
 
-%module core
+%module(package="m5.internal") core
 
 %{
 #include "python/swig/pyobject.hh"
@@ -85,8 +85,3 @@
 bool want_info, info_verbose;
 bool want_hack, hack_verbose;
 
-%wrapper %{
-// fix up module name to reflect the fact that it's inside the m5 package
-#undef SWIG_name
-#define SWIG_name "m5.internal._core"
-%}
diff -r f6e808dd36af -r 146caf930da0 src/python/swig/debug.i
--- a/src/python/swig/debug.i   Thu Sep 09 14:40:19 2010 -0400
+++ b/src/python/swig/debug.i   Thu Sep 09 14:15:40 2010 -0700
@@ -28,7 +28,7 @@
  * Authors: Nathan Binkert
  */
 
-%module debug
+%module(package="m5.internal") debug
 
 %{
 #include "base/types.hh"
@@ -38,9 +38,3 @@
 %include "stdint.i"
 %include "base/types.hh"
 %include "sim/debug.hh"
-
-%wrapper %{
-// fix up module name to reflect the fact that it's inside the m5 package
-#undef SWIG_name
-#define SWIG_name "m5.internal._debug"
-%}
diff -r f6e808dd36af -r 146caf930da0 src/python/swig/event.i
--- a/src/python/swig/event.i   Thu Sep 09 14:40:19 2010 -0400
+++ b/src/python/swig/event.i   Thu Sep 09 14:15:40 2010 -0700
@@ -28,7 +28,7 @@
  * Authors: Nathan Binkert
  */
 
-%module event
+%module(package="m5.internal") event
 
 %{
 #include "base/types.hh"
@@ -102,9 +102,3 @@
 }
 SimLoopExitEvent *simulate(Tick num_cycles = MaxTick);
 void exitSimLoop(const std::string &message, int exit_code);
-
-%wrapper %{
-// fix up module name to reflect the fact that it's inside the m5 package
-#undef SWIG_name
-#define SWIG_name "m5.internal._event"
-%}
diff -r f6e808dd36af -r 146caf930da0 src/python/swig/random.i
--- a/src/python/swig/random.i  Thu Sep 09 14:40:19 2010 -0400
+++ b/src/python/swig/random.i  Thu Sep 09 14:15:40 2010 -0700
@@ -28,7 +28,7 @@
  * Authors: Nathan Binkert
  */
 
-%module random
+%module(package="m5.internal") random
 
 %include "stdint.i"
 
@@ -47,9 +47,3 @@
 %inline %{
 extern void seed(uint64_t seed);
 %}
-
-%wrapper %{
-// fix up module name to reflect the fact that it's inside the m5 package
-#undef SWIG_name
-#define SWIG_name "m5.internal._random"
-%}
diff -r f6e808dd36af -r 146caf930da0 src/python/swig/stats.i
--- a/src/python/swig/stats.i   Thu Sep 09 14:40:19 2010 -0400
+++ b/src/python/swig/stats.i   Thu Sep 09 14:15:40 2010 -0700
@@ -28,7 +28,7 @@
  * Authors: Nathan Binkert
  */
 
-%module stats
+%module(package="m5.internal") stats
 
 %include "std_list.i"
 %include "std_string.i"
@@ -60,9 +60,3 @@
 std::list<Info *> &statsList();
 
 /* namespace Stats */ }
-
-%wrapper %{
-// fix up module name to reflect the fact that it's inside the m5 package
-#undef SWIG_name
-#define SWIG_name "m5.internal._stats"
-%}
diff -r f6e808dd36af -r 146caf930da0 src/python/swig/trace.i
--- a/src/python/swig/trace.i   Thu Sep 09 14:40:19 2010 -0400
+++ b/src/python/swig/trace.i   Thu Sep 09 14:15:40 2010 -0700
@@ -28,7 +28,7 @@
  * Authors: Nathan Binkert
  */
 
-%module trace
+%module(package="m5.internal") trace
 
 %{
 #include "base/trace.hh"
@@ -68,9 +68,3 @@
 extern void ignore(const char *expr);
 extern bool enabled;
 %}
-
-%wrapper %{
-// fix up module name to reflect the fact that it's inside the m5 package
-#undef SWIG_name
-#define SWIG_name "m5.internal._trace"
-%}
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to