isl_union_*_mul_isl_int: pass address of isl_int to callback
authorTobias Grosser <tobias@grosser.es>
Sat, 21 Sep 2013 12:15:36 +0000 (21 14:15 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 4 Dec 2013 12:16:24 +0000 (4 13:16 +0100)
isl_hash_table_foreach expects a user pointer and our callback function
also dereferences the user pointer. Consequently, we pass in a pointer
to the integer value, not its value.

Note that this commit does not have any effect in practice
because of the way isl_int (i.e., mpz_t) is defined.

Signed-off-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_union_templ.c

index 65ab08f..06df246 100644 (file)
@@ -796,7 +796,8 @@ __isl_give UNION *FN(UNION,mul_isl_int)(__isl_take UNION *u, isl_int v)
        if (isl_int_is_neg(v))
                u->type = isl_fold_type_negate(u->type);
 #endif
-       if (isl_hash_table_foreach(u->dim->ctx, &u->table, &mul_isl_int, v) < 0)
+       if (isl_hash_table_foreach(u->dim->ctx, &u->table,
+                                   &mul_isl_int, &v) < 0)
                goto error;
 
        return u;