* 91893 Orsay, France
*/
+#include <isl_map_private.h>
#include <isl/ctx.h>
#include <isl/hash.h>
#include <isl/map.h>
#include <isl/set.h>
#include <isl_dim_private.h>
-#include <isl_map_private.h>
#include <isl_union_map_private.h>
#include <isl/union_set.h>
static int inplace_entry(void **entry, void *user)
{
- __isl_give isl_map *(*fn)(__isl_take isl_map *) = user;
+ __isl_give isl_map *(*fn)(__isl_take isl_map *);
isl_map **map = (isl_map **)entry;
isl_map *copy;
+ fn = *(__isl_give isl_map *(**)(__isl_take isl_map *)) user;
copy = fn(isl_map_copy(*map));
if (!copy)
return -1;
return NULL;
if (isl_hash_table_foreach(umap->dim->ctx, &umap->table,
- &inplace_entry, fn) < 0)
+ &inplace_entry, &fn) < 0)
goto error;
return umap;
!sample)
goto error;
+ if (!sample)
+ sample = isl_basic_map_empty(isl_union_map_get_dim(umap));
+
isl_union_map_free(umap);
return sample;