print ' }'
+class Array(Type):
+
+ def __init__(self, type, length):
+ Type.__init__(self, type.expr + " *", 'P' + type.id)
+ self.type = type
+ self.length = length
+
+ def dump(self, instance):
+ index = '__i' + self.type.id
+ print ' for (int %s; %s < %s; ++%s) {' % (index, index, self.length, index)
+ print ' Log::BeginElement("%s");' % (self.type,)
+ self.type.dump('(%s)[%s]' % (instance, index))
+ print ' Log::EndElement();'
+ print ' }'
+
+ def wrap_instance(self, instance):
+ self.type.wrap_instance("*" + instance)
+
+ def unwrap_instance(self, instance):
+ self.type.wrap_instance("*" + instance)
+
+
class Struct(Concrete):
def __init__(self, name, members):
DllFunction(Void, "glColor3d", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue")]),
DllFunction(Void, "glColor3dv", [(Pointer(Const(GLdouble)), "v")]),
DllFunction(Void, "glColor3f", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue")]),
- DllFunction(Void, "glColor3fv", [(Pointer(Const(GLfloat)), "v")]),
+ DllFunction(Void, "glColor3fv", [(Array(Const(GLfloat), "3"), "v")]),
DllFunction(Void, "glColor3i", [(GLint, "red"), (GLint, "green"), (GLint, "blue")]),
DllFunction(Void, "glColor3iv", [(Pointer(Const(GLint)), "v")]),
DllFunction(Void, "glColor3s", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue")]),