Revision: 1101
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1101&view=rev
Author: roman_yakovenko
Date: 2007-08-17 22:21:30 -0700 (Fri, 17 Aug 2007)
Log Message:
-----------
adding small optimization - reuse parent declaration path
Modified Paths:
--------------
pygccxml_dev/pygccxml/declarations/algorithm.py
Modified: pygccxml_dev/pygccxml/declarations/algorithm.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/algorithm.py 2007-08-16 21:00:46 UTC (rev 1100)
+++ pygccxml_dev/pygccxml/declarations/algorithm.py 2007-08-18 05:21:30 UTC (rev 1101)
@@ -26,8 +26,13 @@
result = [ decl.name ]
parent = decl.parent
while parent:
- result.append( parent.name )
- parent = parent.parent
+ if parent.cache.declaration_path:
+ result.reverse()
+ decl.cache.declaration_path = parent.cache.declaration_path + result
+ return decl.cache.declaration_path
+ else:
+ result.append( parent.name )
+ parent = parent.parent
result.reverse()
decl.cache.declaration_path = result
return result
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|