3 struct isl_basic_set_list *isl_basic_set_list_alloc(struct isl_ctx *ctx, int n)
5 struct isl_basic_set_list *list;
7 isl_assert(ctx, n >= 0, return NULL);
8 list = isl_alloc(ctx, struct isl_basic_set_list,
9 sizeof(struct isl_basic_set_list) +
10 n * sizeof(struct isl_basic_set *));
22 struct isl_basic_set_list *isl_basic_set_list_add(
23 struct isl_basic_set_list *list,
24 struct isl_basic_set *bset)
28 isl_assert(list->ctx, list->n < list->size, goto error);
29 list->p[list->n] = bset;
33 isl_basic_set_free(bset);
34 isl_basic_set_list_free(list);
38 void isl_basic_set_list_free(struct isl_basic_set_list *list)
48 isl_ctx_deref(list->ctx);
49 for (i = 0; i < list->n; ++i)
50 isl_basic_set_free(list->p[i]);