From bd5d8205c1f2f3ccf3cd3efa5cbe72b64baa06e7 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Thu, 2 Oct 2008 17:28:14 +0100 Subject: [PATCH] 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. --- pybindgen/gccxmlparser.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pybindgen/gccxmlparser.py b/pybindgen/gccxmlparser.py index a4d989a..9e2ab8c 100644 --- a/pybindgen/gccxmlparser.py +++ b/pybindgen/gccxmlparser.py @@ -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