From: Sven Verdoolaege Date: Fri, 12 Apr 2013 08:02:09 +0000 (+0200) Subject: util.c: manual_count: use isl_val X-Git-Tag: barvinok-0.37~38 X-Git-Url: https://repo.or.cz/w/barvinok.git/commitdiff_plain/70e2f8da63893cb2481df4ce44db3c0a5bb40a8e util.c: manual_count: use isl_val Signed-off-by: Sven Verdoolaege --- diff --git a/util.c b/util.c index 1466560..db474e9 100644 --- a/util.c +++ b/util.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -21,22 +22,20 @@ void manual_count(Polyhedron *P, Value* result) isl_ctx *ctx = isl_ctx_alloc(); isl_space *dim; isl_set *set; - isl_int v; + isl_val *v; int nvar = P->Dimension; - int r; dim = isl_space_set_alloc(ctx, 0, nvar); set = isl_set_new_from_polylib(P, dim); - isl_int_init(v); - r = isl_set_count(set, &v); - isl_int_get_gmp(v, *result); - isl_int_clear(v); + v = isl_set_count_val(set); + isl_val_get_num_gmp(v, *result); + isl_val_free(v); isl_set_free(set); isl_ctx_free(ctx); - assert(r >= 0); + assert(v); } #include