summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2005-03-13 00:54:34 -0500
committerSteve Reinhardt <stever@eecs.umich.edu>2005-03-13 00:54:34 -0500
commitd94f5bfb04a9e5e99242f960ca20a6e693e6ad56 (patch)
tree82ee50cc8bedfca14de1611f9e6aad2ad58f857e /python
parent8dff74b26fbfafad4ea9a12d20ad57b8094b0bc9 (diff)
downloadgem5-d94f5bfb04a9e5e99242f960ca20a6e693e6ad56.tar.xz
A few fixes after trying one of Nate's job scripts.
python/m5/config.py: Add issequence to __all__ export list. Added some more comments too. --HG-- extra : convert_revision : 17cd9205e43fe276f71563fcb96ec3c5069fcc86
Diffstat (limited to 'python')
-rw-r--r--python/m5/config.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/python/m5/config.py b/python/m5/config.py
index a4248192a..74022059f 100644
--- a/python/m5/config.py
+++ b/python/m5/config.py
@@ -209,11 +209,16 @@ class_decorator = 'M5M5_SIMOBJECT_'
expr_decorator = 'M5M5_EXPRESSION_'
dot_decorator = '_M5M5_DOT_'
+# 'Global' map of legitimate types for SimObject parameters.
param_types = {}
+# Dummy base class to identify types that are legitimate for SimObject
+# parameters.
class ParamType(object):
pass
+# Add types defined in given context (dict or module) that are derived
+# from ParamType to param_types map.
def add_param_types(ctx):
if isinstance(ctx, types.DictType):
source_dict = ctx
@@ -1339,7 +1344,10 @@ class SimObject(ConfigNode, ParamType):
type = 'SimObject'
-__all__ = ['env',
+# __all__ defines the list of symbols that get exported when
+# 'from config import *' is invoked. Try to keep this reasonably
+# short to avoid polluting other namespaces.
+__all__ = ['env', 'issequence',
'ConfigNode', 'SimObject', 'ParamContext', 'Param', 'VectorParam',
'Super', 'Enum',
'Int', 'Unsigned', 'Int8', 'UInt8', 'Int16', 'UInt16',