isl_*_dim: return isl_size
commite7f5c82acde24ea538dc3dd789d39752004bdfc5
authorSven Verdoolaege <sven.verdoolaege@gmail.com>
Tue, 7 Aug 2018 10:09:42 +0000 (7 12:09 +0200)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Thu, 6 Sep 2018 15:01:48 +0000 (6 17:01 +0200)
tree664ff38e99d11a133ebeb9d728b04351380035cd
parentc1363fd907175bc329488c3f3c22ded538c05a48
isl_*_dim: return isl_size

This improves both error handling and consistency.
Most of the isl_*_dim functions used to return "unsigned",
while isl_local_space_dim, isl_aff_dim and isl_constraint_dim
returned "int".  Only isl_constraint_dim returned
a negative value on error.
Now, all isl_*_dim functions return isl_size and
they all return a negative value on error.

All callers have been adjusted to take into account
this possibly negative return value.
In particular, since there was no way for the functions
returning "unsigned" to indicate an error condition,
all callers were forced to check the arguments before the call
(with no guarantee of catching all errors) and can now
simply check the return value.

Outside callers need similar adjustments.

Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
75 files changed:
basis_reduction_templ.c
bound.c
check_type_range_templ.c
doc/user.pod
include/isl/aff.h
include/isl/constraint.h
include/isl/local_space.h
include/isl/map.h
include/isl/multi.h
include/isl/polynomial.h
include/isl/set.h
include/isl/space.h
include/isl/union_map.h
include/isl/union_set.h
isl_aff.c
isl_aff_map.c
isl_affine_hull.c
isl_ast_build.c
isl_ast_build_expr.c
isl_ast_build_private.h
isl_ast_codegen.c
isl_ast_graft.c
isl_bernstein.c
isl_bound.c
isl_box.c
isl_coalesce.c
isl_constraint.c
isl_convex_hull.c
isl_dim_map.c
isl_equalities.c
isl_factorization.c
isl_farkas.c
isl_flow.c
isl_fold.c
isl_ilp.c
isl_input.c
isl_local.c
isl_local_space.c
isl_lp.c
isl_map.c
isl_map_simplify.c
isl_map_subtract.c
isl_morph.c
isl_morph.h
isl_multi_dims.c
isl_multi_identity_templ.c
isl_multi_product_templ.c
isl_multi_splice_templ.c
isl_multi_templ.c
isl_multi_zero_templ.c
isl_output.c
isl_point.c
isl_polynomial.c
isl_pw_templ.c
isl_range.c
isl_reordering.c
isl_sample.c
isl_scan.c
isl_schedule_band.c
isl_schedule_node.c
isl_schedule_tree.c
isl_scheduler.c
isl_space.c
isl_stride.c
isl_tab.c
isl_tab_lexopt_templ.c
isl_tab_pip.c
isl_test.c
isl_transitive_closure.c
isl_union_map.c
isl_union_templ.c
isl_vertices.c
pip.c
polyhedron_minimize.c
polytope_scan.c