evalue_isl.c: isl_qpolynomial_from_evalue: use isl_val
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 18 Apr 2013 09:52:39 +0000 (18 11:52 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 31 May 2013 08:53:21 +0000 (31 10:53 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
evalue_isl.c

index 2689437..bc08a4a 100644 (file)
@@ -92,8 +92,11 @@ __isl_give isl_qpolynomial *isl_qpolynomial_from_evalue(__isl_take isl_space *di
 
        if (EVALUE_IS_NAN(*e))
                return isl_qpolynomial_infty_on_domain(dim);
-       if (value_notzero_p(e->d))
-               return isl_qpolynomial_rat_cst_on_domain(dim, e->x.n, e->d);
+       if (value_notzero_p(e->d)) {
+               isl_ctx *ctx = isl_space_get_ctx(dim);
+               isl_val *val = isl_val_from_gmp(ctx, e->x.n, e->d);
+               return isl_qpolynomial_val_on_domain(dim, val);
+       }
 
        offset = type_offset(e->x.p);