Modified:
/branches/1.0/lib/qwarray.g
=======================================
--- /branches/1.0/lib/qwarray.g Wed Jul 27 02:55:15 2011
+++ /branches/1.0/lib/qwarray.g Wed Jul 27 07:32:57 2011
@@ -12,13 +12,13 @@
END.
Define primitive qwarray_new
- : Fun(spec A:type)(n:word)(f:Fun(i:word).A).#unique <qwarray A n> :=
+ : Fun(spec A:type)(n:word)(f:Fun(i:word).#unique A).#unique <qwarray A
n> :=
fun(spec A:type)(n:word)(f:Fun(i:word).A). (mkvec A (f word0)
(word_to_nat n)) <<END
void *gqwarray_new(int n, void* (*f)(int), void *a) {
void **h = (void **)guru_malloc(sizeof(void *)*n);
int c;
for (c = 0; c < n; c++)
- h[c] = f(c); // f is a generator function.
+ h[c] = f(0); // f is a generator function.
return h;
}
END.