isl_qpolynomial_from_aff: create private copy of divs
[platform/upstream/isl.git] / isl_bernstein.c
index 2700e82..afeccf6 100644 (file)
  * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France
  */
 
-#include <isl_set.h>
-#include <isl_seq.h>
+#include <isl_ctx_private.h>
+#include <isl_map_private.h>
+#include <isl/set.h>
+#include <isl/seq.h>
 #include <isl_morph.h>
 #include <isl_factorization.h>
 #include <isl_vertices_private.h>
@@ -261,8 +263,7 @@ static int bernstein_coefficients_cell(__isl_take isl_cell *cell, void *user)
                return isl_cell_foreach_simplex(cell,
                                            &bernstein_coefficients_cell, user);
 
-       subs = isl_alloc_array(data->poly->dim->ctx, isl_qpolynomial *,
-                               1 + nvar);
+       subs = isl_alloc_array(ctx, isl_qpolynomial *, 1 + nvar);
        if (!subs)
                goto error;