From 1d27084043855d2609b54d3435f0bd85e39762e2 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 21 Dec 2004 21:26:36 +0000 Subject: Added some comments and fixed typeos. Slightly refactored the way function parameters are iterated. There are no changes in the generated code. --- src/mesa/glapi/gl_XML.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/mesa/glapi/gl_XML.py') diff --git a/src/mesa/glapi/gl_XML.py b/src/mesa/glapi/gl_XML.py index 79da5abab9..a58f285155 100644 --- a/src/mesa/glapi/gl_XML.py +++ b/src/mesa/glapi/gl_XML.py @@ -252,14 +252,17 @@ class glParameter( glItem ): class glParameterIterator: """Class to iterate over a list of glParameters. - Objects of this class are returned by the __iter__ method of the - glFunction class. They are used to iterate over the list of + Objects of this class are returned by the parameterIterator method of + the glFunction class. They are used to iterate over the list of parameters to the function.""" def __init__(self, data): self.data = data self.index = 0 - + + def __iter__(self): + return self + def next(self): if self.index == len( self.data ): raise StopIteration @@ -295,7 +298,7 @@ class glFunction( glItem ): return - def __iter__(self): + def parameterIterator(self): return glParameterIterator(self.fn_parameters) @@ -325,7 +328,7 @@ class glFunction( glItem ): def get_parameter_string(self): arg_string = "" comma = "" - for p in self: + for p in glFunction.parameterIterator(self): arg_string = arg_string + comma + p.p_type_string + " " + p.name comma = ", " -- cgit v1.2.3