summaryrefslogtreecommitdiffstats
path: root/src/mesa/glapi/gl_XML.py
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2005-03-17 20:56:13 +0000
committerIan Romanick <[email protected]>2005-03-17 20:56:13 +0000
commit6af6a6931240b1e05b3bb7cc2b56df29193ea65a (patch)
tree7b17c2d97ea1afbd7c9ae6c8a19bb9abebfadaa9 /src/mesa/glapi/gl_XML.py
parent979f35fb78f39cec5de53795ce91f674bfb9df52 (diff)
Minor refactoring and code tweaking. The only notable chage is that
FilterGLAPISpecBase::xref is replaced by FilterGLAPISpecBase::functions_by_name. The notable difference between the two is that ::functions_by_name includes all functions, whether they have an assigned offset or not. This feature will be useful (necessary) when more server-side code is generated.
Diffstat (limited to 'src/mesa/glapi/gl_XML.py')
-rw-r--r--src/mesa/glapi/gl_XML.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/mesa/glapi/gl_XML.py b/src/mesa/glapi/gl_XML.py
index 3f87a5712a3..1c4e734f85f 100644
--- a/src/mesa/glapi/gl_XML.py
+++ b/src/mesa/glapi/gl_XML.py
@@ -529,22 +529,18 @@ class glFunctionIterator:
class FilterGLAPISpecBase(saxutils.XMLFilterBase):
name = "a"
license = "The license for this file is unspecified."
- functions = {}
next_alias = -2
- types = {}
- xref = {}
current_object = None
- factory = None
- current_category = ""
def __init__(self):
saxutils.XMLFilterBase.__init__(self)
self.functions = {}
self.types = {}
- self.xref = {}
+ self.functions_by_name = {}
self.factory = glItemFactory()
self.header_tag = None
self.undef_list = []
+ self.current_category = ""
def find_type(self,type_name):
@@ -556,8 +552,7 @@ class FilterGLAPISpecBase(saxutils.XMLFilterBase):
def find_function(self,function_name):
- index = self.xref[function_name]
- return self.functions[index]
+ return self.functions_by_name[function_name]
def functionIterator(self):
@@ -626,7 +621,9 @@ class FilterGLAPISpecBase(saxutils.XMLFilterBase):
self.next_alias -= 1
self.functions[index] = obj
- self.xref[obj.name] = index
+
+ self.functions_by_name[obj.name] = obj
+
elif object_type == "type":
self.types[obj.name] = obj