summaryrefslogtreecommitdiffstats
path: root/src/mesa/glapi
diff options
context:
space:
mode:
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 615f79729cf..8520d9e33ea 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