summaryrefslogtreecommitdiff
path: root/src/mesa/glapi
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2005-05-26 16:59:47 +0000
committerIan Romanick <idr@us.ibm.com>2005-05-26 16:59:47 +0000
commit70dbbbf89af4c1d6d9b52cbbb79ee7f9ad654592 (patch)
treec6b9b5d5b5a166b3a4d742d9447390d57d8e8b8b /src/mesa/glapi
parent497dd3e920bef8f72cd6a85b2551cd309fb7b631 (diff)
Fix gl_enums.py so that enums that are listed with the same name in
multiple places don't get generated multiple times.
Diffstat (limited to 'src/mesa/glapi')
-rw-r--r--src/mesa/glapi/gl_enums.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/glapi/gl_enums.py b/src/mesa/glapi/gl_enums.py
index 615f79729c..8520d9e33e 100644
--- a/src/mesa/glapi/gl_enums.py
+++ b/src/mesa/glapi/gl_enums.py
@@ -31,10 +31,11 @@ import gl_XML
import sys, getopt
class PrintGlEnums(gl_XML.FilterGLAPISpecBase):
- name = "gl_enums.py (from Mesa)"
def __init__(self):
gl_XML.FilterGLAPISpecBase.__init__(self)
+
+ self.name = "gl_enums.py (from Mesa)"
self.license = license.bsd_license_template % ( \
"""Copyright (C) 1999-2005 Brian Paul All Rights Reserved.""", "BRIAN PAUL")
self.enum_table = {}
@@ -186,7 +187,13 @@ int _mesa_lookup_enum_by_name( const char *symbol )
# Prevent duplicate names in the enum table.
- if obj.name not in self.enum_table[ obj.value ]:
+ found_it = 0
+ for [n, junk] in self.enum_table[ obj.value ]:
+ if n == obj.name:
+ found_it = 1
+ break
+
+ if not found_it:
# Calculate a "priority" for this enum name.
# When we lookup an enum by number, there may