Don't leave the type registration order completely undefined; we may want to generate python scripts to become version controlled, and random order leads to spurious diffs as the scanning is done in different machines.

This commit is contained in:
Gustavo J. A. M. Carneiro committed 2008-10-02 17:28:14 +01:00
1 parent 32c6811c65
commit bd5d8205c1
1 file changed
+4
+4
View File
@@ -975,6 +975,10 @@ pybindgen.settings.error_handler = ErrorHandler()
continue
typedefs.append(typedef)
def cls_cmp(a, b):
return cmp(a.decl_string, b.decl_string)
unregistered_classes.sort(cls_cmp)
def postpone_class(cls, reason):
## detect the case of a class being postponed many times; that
## is almost certainly an error and a sign of an infinite