polysign_isl.c: extract_inequalities: use isl_val
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 9 Apr 2013 14:25:29 +0000 (9 16:25 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 31 May 2013 08:53:20 +0000 (31 10:53 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
polysign_isl.c

index e57690d..b9c6667 100644 (file)
@@ -41,7 +41,7 @@ static __isl_give isl_mat *extract_inequalities(isl_ctx *ctx, Matrix *M)
 {
        int i, j;
        int n;
-       isl_int v;
+       isl_val *v;
        isl_mat *ineq;
 
        n = 0;
@@ -49,17 +49,15 @@ static __isl_give isl_mat *extract_inequalities(isl_ctx *ctx, Matrix *M)
                if (!value_zero_p(M->p[i][0]))
                        ++n;
 
-       isl_int_init(v);
        ineq = isl_mat_alloc(ctx, n, M->NbColumns - 1);
        for (i = 0; i < M->NbRows; ++i) {
                if (value_zero_p(M->p[i][0]))
                        continue;
                for (j = 0; j < M->NbColumns - 1; ++j) {
-                       isl_int_set_gmp(v, M->p[i][1 + j]);
-                       ineq = isl_mat_set_element(ineq, i, j, v);
+                       v = isl_val_int_from_gmp(ctx, M->p[i][1 + j]);
+                       ineq = isl_mat_set_element_val(ineq, i, j, v);
                }
        }
-       isl_int_clear(v);
 
        return ineq;
 }