diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2008-06-12 01:00:29 -0400 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2008-06-12 01:00:29 -0400 |
commit | 7be8e671f1fac98fb26155d4804ba005e6b75b0f (patch) | |
tree | a002fb866b356fe8bdb135ddfe8b6442742a5304 /src/python/m5 | |
parent | 5b5875341cb7d86ad7ce497666f0af526158775f (diff) | |
download | gem5-7be8e671f1fac98fb26155d4804ba005e6b75b0f.tar.xz |
Params: Allow nested namespaces in cxx_namespace
Diffstat (limited to 'src/python/m5')
-rw-r--r-- | src/python/m5/SimObject.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/python/m5/SimObject.py b/src/python/m5/SimObject.py index 78df6bef1..d1aec44b3 100644 --- a/src/python/m5/SimObject.py +++ b/src/python/m5/SimObject.py @@ -217,7 +217,10 @@ class MetaSimObject(type): # just declaring a pointer. decl = 'class %s;' % _cxx_class if namespace: - decl = 'namespace %s { %s }' % (namespace, decl) + namespaces = namespace.split('::') + namespaces.reverse() + for namespace in namespaces: + decl = 'namespace %s { %s }' % (namespace, decl) cls._value_dict['cxx_predecls'] = [decl] if 'swig_predecls' not in cls._value_dict: |