struct isl_obj isl_stream_read_obj(struct isl_stream *s);
__isl_give isl_map *isl_stream_read_map(struct isl_stream *s, int nparam);
+__isl_give isl_set *isl_stream_read_set(struct isl_stream *s, int nparam);
__isl_give isl_pw_qpolynomial *isl_stream_read_pw_qpolynomial(
struct isl_stream *s);
return NULL;
}
+__isl_give isl_set *isl_stream_read_set(struct isl_stream *s, int nparam)
+{
+ struct isl_obj obj;
+ struct isl_set *set;
+
+ obj = obj_read(s, nparam);
+ if (obj.v)
+ isl_assert(s->ctx, obj.type == isl_obj_set, goto error);
+
+ return obj.v;
+error:
+ obj.type->free(obj.v);
+ return NULL;
+}
+
static struct isl_basic_map *basic_map_read(struct isl_stream *s, int nparam)
{
struct isl_obj obj;