summaryrefslogtreecommitdiff
path: root/src/mesa/glapi/gl_XML.py
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2004-12-21 21:26:36 +0000
committerIan Romanick <idr@us.ibm.com>2004-12-21 21:26:36 +0000
commit1d27084043855d2609b54d3435f0bd85e39762e2 (patch)
treec125fec1fd916feb80433d7c65a03fc7d5df8de4 /src/mesa/glapi/gl_XML.py
parentb756990b8407d67a15cf7f63683d50dd7f9e3a4e (diff)
Added some comments and fixed typeos. Slightly refactored the way
function parameters are iterated. There are no changes in the generated code.
Diffstat (limited to 'src/mesa/glapi/gl_XML.py')
-rw-r--r--src/mesa/glapi/gl_XML.py13
1 files changed, 8 insertions, 5 deletions
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 = ", "