projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b58753
)
Params: Allow nested namespaces in cxx_namespace
author
Gabe Black
<gblack@eecs.umich.edu>
Thu, 12 Jun 2008 05:00:29 +0000
(
01:00
-0400)
committer
Gabe Black
<gblack@eecs.umich.edu>
Thu, 12 Jun 2008 05:00:29 +0000
(
01:00
-0400)
src/python/m5/SimObject.py
patch
|
blob
|
history
diff --git
a/src/python/m5/SimObject.py
b/src/python/m5/SimObject.py
index 78df6bef1f1979f8844b124b462da117ee9ece77..d1aec44b384eefad29e5a4946f18e9574a14cd14 100644
(file)
--- 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: