From 2974dc7a3771e34542ed5bd1baf88e4ced8cf139 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 27 Jan 2017 12:40:01 +0000 Subject: python: Move native wrappers to the _m5 namespace Swig wrappers for native objects currently share the _m5.internal name space with Python code. This is undesirable if we ever want to switch from Swig to some other framework for native binding (e.g., PyBind11 or Boost::Python). This changeset moves all of such wrappers to the _m5 namespace, which is now reserved for native code. Change-Id: I2d2bc12dbc05b57b7c5a75f072e08124413d77f3 Signed-off-by: Andreas Sandberg Reviewed-by: Curtis Dunham Reviewed-by: Jason Lowe-Power --- src/unittest/SConscript | 2 +- src/unittest/stattest.i | 2 +- src/unittest/stattestmain.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/unittest') diff --git a/src/unittest/SConscript b/src/unittest/SConscript index 0275cdb42..2737be8f5 100644 --- a/src/unittest/SConscript +++ b/src/unittest/SConscript @@ -46,7 +46,7 @@ UnitTest('strnumtest', 'strnumtest.cc') UnitTest('trietest', 'trietest.cc') stattest_py = PySource('m5', 'stattestmain.py', skip_lib=True) -stattest_swig = SwigSource('m5.internal', 'stattest.i', skip_lib=True) +stattest_swig = SwigSource('_m5', 'stattest.i', skip_lib=True) UnitTest('stattest', 'stattest.cc', stattest_py, stattest_swig, main=True) UnitTest('symtest', 'symtest.cc') diff --git a/src/unittest/stattest.i b/src/unittest/stattest.i index 0cc9192ba..66990689f 100644 --- a/src/unittest/stattest.i +++ b/src/unittest/stattest.i @@ -28,7 +28,7 @@ * Authors: Nathan Binkert */ -%module(package="m5.internal") stattest +%module(package="_m5") stattest %inline %{ extern void stattest_init(); diff --git a/src/unittest/stattestmain.py b/src/unittest/stattestmain.py index 2c0a4a9aa..70fef59be 100644 --- a/src/unittest/stattestmain.py +++ b/src/unittest/stattestmain.py @@ -1,5 +1,5 @@ def main(): - from m5.internal.stattest import stattest_init, stattest_run + from _m5.stattest import stattest_init, stattest_run import m5.stats stattest_init() -- cgit v1.2.3