Revision: 297
Author: roman_yakovenko
Date: 2006-07-11 08:44:30 -0700 (Tue, 11 Jul 2006)
ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=297&view=rev
Log Message:
-----------
improving generated code stability( order of generated code should not change from
one generation to another )
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/module_creator/class_organizer.py
Modified: pyplusplus_dev/pyplusplus/module_creator/class_organizer.py
===================================================================
--- pyplusplus_dev/pyplusplus/module_creator/class_organizer.py 2006-07-11 12:39:43 UTC (rev 296)
+++ pyplusplus_dev/pyplusplus/module_creator/class_organizer.py 2006-07-11 15:44:30 UTC (rev 297)
@@ -59,7 +59,10 @@
if not isinstance( base_type, declarations.declarated_t ):
continue
top_class_inst = self.__get_top_class_inst( base_type.declaration )
- i_depend_on_them.add( full_name( top_class_inst ) )
+ i_depend_on_them.add( full_name( top_class_inst ) )
+
+ i_depend_on_them = list( i_depend_on_them )
+ i_depend_on_them.sort()
return i_depend_on_them
def __get_top_class_inst( self, decl ):
@@ -71,8 +74,8 @@
def _topological_sort(self):
self._dfs()
- def _dfs( self ):
- for class_ in self.__dependencies_graph:
+ def _dfs( self ):
+ for class_ in sorted( self.__dependencies_graph.keys() ):
if self.__colors[class_] == COLOR.WHITE:
self._dfs_visit(class_)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|