diff options
-rw-r--r-- | src/mapi/glapi/gen/gl_XML.py | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py index 91f10910aa..334fd6e683 100644 --- a/src/mapi/glapi/gen/gl_XML.py +++ b/src/mapi/glapi/gen/gl_XML.py @@ -919,20 +919,12 @@ class gl_api(object): func_cat_type, key = classify_category(cat_name, cat_number) lists[func_cat_type][key][func.name] = func - - functions = [] - for func_cat_type in range(4): - keys = lists[func_cat_type].keys() - keys.sort() - - for key in keys: - names = lists[func_cat_type][key].keys() - names.sort() - - for name in names: - functions.append(lists[func_cat_type][key][name]) - - return iter(functions) + # This needs to be use {iter}items(), (and thus the _) to be able to + # sort correctly. + for dict_ in lists: + for _, items in sorted(dict_.iteritems()): + for _, function in sorted(items.iteritems()): + yield function def functionIterateByOffset(self): max_offset = max(f.offset for f in self.functions_by_name.itervalues()) |