From 38e6e09cb86ef0bfea87a907def49f00af67fd8f Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 25 Jan 2005 23:53:13 +0000 Subject: 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. --- src/mesa/glapi/gl_apitemp.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/mesa/glapi/gl_apitemp.py') 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) -- cgit v1.2.3