Revision: 957
http://svn.sourceforge.net/pygccxml/?rev=957&view=rev
Author: allenb
Date: 2007-03-21 15:51:36 -0700 (Wed, 21 Mar 2007)
Log Message:
-----------
- Add a fallback method of getting the template class
Modified Paths:
--------------
pyplusplus_dev/contrib/goodies/goodie_utils.py
Modified: pyplusplus_dev/contrib/goodies/goodie_utils.py
===================================================================
--- pyplusplus_dev/contrib/goodies/goodie_utils.py 2007-03-12 12:36:39 UTC (rev 956)
+++ pyplusplus_dev/contrib/goodies/goodie_utils.py 2007-03-21 22:51:36 UTC (rev 957)
@@ -189,7 +189,12 @@
"""
# Look up the decl from the alias db
# XXX: I don't know if this is the best way to look up the decl, but it seems to work
- self.mDecl = templateBuilder.mAliasDB[self.mTypedefName].declaration.type.declaration
+ try:
+ self.mDecl = templateBuilder.mAliasDB[self.mTypedefName].declaration.type.declaration
+ except:
+ # If that didn't work, just try to get it from the first declaration
+ self.mDecl = templateBuilder.mAliasDB[self.mTypedefName].declaration
+
# Another method
# decl_name = templateBuilder.mAliasDB[self.mTypedefName].declaration.name
# decl = ns.decl(decl_name)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|