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 <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
This commit is contained in:
@@ -28,10 +28,9 @@
|
||||
|
||||
from UserDict import DictMixin
|
||||
|
||||
import internal
|
||||
|
||||
from internal.debug import SimpleFlag, CompoundFlag
|
||||
from internal.debug import schedBreak, setRemoteGDBPort
|
||||
import _m5.debug
|
||||
from _m5.debug import SimpleFlag, CompoundFlag
|
||||
from _m5.debug import schedBreak, setRemoteGDBPort
|
||||
from m5.util import printList
|
||||
|
||||
def help():
|
||||
@@ -61,12 +60,12 @@ class AllFlags(DictMixin):
|
||||
self._dict = {}
|
||||
|
||||
def _update(self):
|
||||
current_version = internal.debug.getAllFlagsVersion()
|
||||
current_version = _m5.debug.getAllFlagsVersion()
|
||||
if self._version == current_version:
|
||||
return
|
||||
|
||||
self._dict.clear()
|
||||
for flag in internal.debug.getAllFlags():
|
||||
for flag in _m5.debug.getAllFlags():
|
||||
self._dict[flag.name()] = flag
|
||||
self._version = current_version
|
||||
|
||||
|
||||
Reference in New Issue
Block a user