diff options
Diffstat (limited to 'src/mapi/glapi/gen/gl_XML.py')
-rw-r--r-- | src/mapi/glapi/gen/gl_XML.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py index 221bd18a6d..91f10910aa 100644 --- a/src/mapi/glapi/gen/gl_XML.py +++ b/src/mapi/glapi/gen/gl_XML.py @@ -29,6 +29,7 @@ # Ian Romanick <idr@us.ibm.com> from decimal import Decimal +import collections import os.path import re import textwrap @@ -909,17 +910,13 @@ class gl_api(object): Within a category, functions are sorted by name. If cat is not None, then only functions in that category are iterated. """ - lists = [{}, {}, {}, {}] + lists = [collections.defaultdict(lambda: {}) for _ in range(4)] for func in self.functionIterateAll(): - [cat_name, cat_number] = self.category_dict[func.name] + cat_name, cat_number = self.category_dict[func.name] if cat is None or cat == cat_name: - [func_cat_type, key] = classify_category(cat_name, cat_number) - - if key not in lists[func_cat_type]: - lists[func_cat_type][key] = {} - + func_cat_type, key = classify_category(cat_name, cat_number) lists[func_cat_type][key][func.name] = func |