diff options
author | Ian Romanick <idr@us.ibm.com> | 2005-01-25 23:53:13 +0000 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2005-01-25 23:53:13 +0000 |
commit | 38e6e09cb86ef0bfea87a907def49f00af67fd8f (patch) | |
tree | b110fa4835b5d389af81a5706f487164a510e69d /src/mesa/glapi/gl_apitemp.py | |
parent | e4d41524a229aa1e0788668b28151125b9c6581e (diff) |
Add a glFunctionIterator class to iterate over the functions stored in a
higher-level API object. Use this type of object to implement the
printFunctions method. Modify other functions that iterate over the list of
functions to use this type of object.
Diffstat (limited to 'src/mesa/glapi/gl_apitemp.py')
-rw-r--r-- | src/mesa/glapi/gl_apitemp.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mesa/glapi/gl_apitemp.py b/src/mesa/glapi/gl_apitemp.py index 533cc65bec..d89440acbf 100644 --- a/src/mesa/glapi/gl_apitemp.py +++ b/src/mesa/glapi/gl_apitemp.py @@ -149,12 +149,10 @@ class PrintGlOffsets(gl_XML.FilterGLAPISpecBase): #endif static _glapi_proc DISPATCH_TABLE_NAME[] = {""" - keys = self.functions.keys() - keys.sort() - for k in keys: - if k < 0: continue + for f in self.functionIterator(): + if f.fn_offset < 0: continue - print ' TABLE_ENTRY(%s),' % (self.functions[k].name) + print ' TABLE_ENTRY(%s),' % (f.name) print ' /* A whole bunch of no-op functions. These might be called' print ' * when someone tries to call a dynamically-registered' @@ -177,11 +175,7 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {""" #ifdef UNUSED_TABLE_NAME static _glapi_proc UNUSED_TABLE_NAME[] = {""" - keys = self.functions.keys() - keys.sort() - keys.reverse(); - for k in keys: - f = self.functions[k] + for f in self.functionIterator(): if f.fn_offset < 0: print ' TABLE_ENTRY(%s),' % (f.name) |