doc: update example code to change in return type of isl_constraint_set_*
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 13 Sep 2011 10:51:12 +0000 (12:51 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 13 Sep 2011 10:51:12 +0000 (12:51 +0200)
The change happened way back in e2a2317 (reimplement isl_constraint in terms
of isl_aff, Fri Jul 1 17:20:52 2011 +0200).

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod

index 245259d..1447ab2 100644 (file)
@@ -1108,40 +1108,30 @@ using the following functions.
 For example, to create a set containing the even integers
 between 10 and 42, you would use the following code.
 
-       isl_int v;
        isl_space *space;
        isl_constraint *c;
        isl_basic_set *bset;
 
-       isl_int_init(v);
        space = isl_space_set_alloc(ctx, 0, 2);
        bset = isl_basic_set_universe(isl_space_copy(space));
 
        c = isl_equality_alloc(isl_space_copy(space));
-       isl_int_set_si(v, -1);
-       isl_constraint_set_coefficient(c, isl_dim_set, 0, v);
-       isl_int_set_si(v, 2);
-       isl_constraint_set_coefficient(c, isl_dim_set, 1, v);
+       c = isl_constraint_set_coefficient_si(c, isl_dim_set, 0, -1);
+       c = isl_constraint_set_coefficient_si(c, isl_dim_set, 1, 2);
        bset = isl_basic_set_add_constraint(bset, c);
 
        c = isl_inequality_alloc(isl_space_copy(space));
-       isl_int_set_si(v, -10);
-       isl_constraint_set_constant(c, v);
-       isl_int_set_si(v, 1);
-       isl_constraint_set_coefficient(c, isl_dim_set, 0, v);
+       c = isl_constraint_set_constant_si(c, -10);
+       c = isl_constraint_set_coefficient_si(c, isl_dim_set, 0, 1);
        bset = isl_basic_set_add_constraint(bset, c);
 
        c = isl_inequality_alloc(space);
-       isl_int_set_si(v, 42);
-       isl_constraint_set_constant(c, v);
-       isl_int_set_si(v, -1);
-       isl_constraint_set_coefficient(c, isl_dim_set, 0, v);
+       c = isl_constraint_set_constant_si(c, 42);
+       c = isl_constraint_set_coefficient_si(c, isl_dim_set, 0, -1);
        bset = isl_basic_set_add_constraint(bset, c);
 
        bset = isl_basic_set_project_out(bset, isl_dim_set, 1, 1);
 
-       isl_int_clear(v);
-
 Or, alternatively,
 
        isl_basic_set *bset;