if (!sol)
goto error;
- if (vec)
- *vec = isl_vec_alloc(bmap->ctx, 1 + total);
+ if (vec) {
+ isl_ctx *ctx = isl_basic_map_get_ctx(bmap);
+ *vec = isl_vec_alloc(ctx, 1 + total);
+ }
if (vec && !*vec)
res = isl_lp_error;
else if (!sol->list)
if (!bset)
goto error;
- ctx = bset->ctx;
+ ctx = isl_basic_set_get_ctx(bset);
isl_assert(ctx, isl_basic_set_n_param(bset) == 0, goto error);
- isl_assert(ctx, bset->n_div == 0, goto error);
+ isl_assert(ctx, isl_basic_set_dim(bset, isl_dim_div) == 0, goto error);
dim = isl_basic_set_n_dim(bset);
domain = isl_basic_map_to_pip((struct isl_basic_map *)bset, 0, 0, 0);
if (!domain)