isl_union_map_free: return NULL
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 12 Jul 2011 09:39:33 +0000 (11:39 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 12 Jul 2011 15:41:35 +0000 (17:41 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/union_map.h
include/isl/union_set.h
isl_union_map.c

index 4e58057..6963278 100644 (file)
@@ -940,10 +940,10 @@ functions.
                __isl_keep isl_union_map *umap);
        void isl_basic_set_free(__isl_take isl_basic_set *bset);
        void isl_set_free(__isl_take isl_set *set);
-       void isl_union_set_free(__isl_take isl_union_set *uset);
+       void *isl_union_set_free(__isl_take isl_union_set *uset);
        void isl_basic_map_free(__isl_take isl_basic_map *bmap);
        void isl_map_free(__isl_take isl_map *map);
-       void isl_union_map_free(__isl_take isl_union_map *umap);
+       void *isl_union_map_free(__isl_take isl_union_map *umap);
 
 Other sets and relations can be constructed by starting
 from a universe set or relation, adding equality and/or
index 7f5d4c4..b7eb581 100644 (file)
@@ -19,7 +19,7 @@ typedef struct isl_union_set isl_union_set;
 __isl_give isl_union_map *isl_union_map_from_map(__isl_take isl_map *map);
 __isl_give isl_union_map *isl_union_map_empty(__isl_take isl_dim *dim);
 __isl_give isl_union_map *isl_union_map_copy(__isl_keep isl_union_map *umap);
-void isl_union_map_free(__isl_take isl_union_map *umap);
+void *isl_union_map_free(__isl_take isl_union_map *umap);
 
 isl_ctx *isl_union_map_get_ctx(__isl_keep isl_union_map *umap);
 __isl_give isl_dim *isl_union_map_get_dim(__isl_keep isl_union_map *umap);
index 84b374f..7a9cc41 100644 (file)
@@ -11,7 +11,7 @@ extern "C" {
 __isl_give isl_union_set *isl_union_set_from_set(__isl_take isl_set *set);
 __isl_give isl_union_set *isl_union_set_empty(__isl_take isl_dim *dim);
 __isl_give isl_union_set *isl_union_set_copy(__isl_keep isl_union_set *uset);
-void isl_union_set_free(__isl_take isl_union_set *uset);
+void *isl_union_set_free(__isl_take isl_union_set *uset);
 
 isl_ctx *isl_union_set_get_ctx(__isl_keep isl_union_set *uset);
 __isl_give isl_dim *isl_union_set_get_dim(__isl_keep isl_union_set *uset);
index abe03fc..50be76a 100644 (file)
@@ -225,24 +225,25 @@ __isl_give isl_union_set *isl_union_set_copy(__isl_keep isl_union_set *uset)
        return isl_union_map_copy(uset);
 }
 
-void isl_union_map_free(__isl_take isl_union_map *umap)
+void *isl_union_map_free(__isl_take isl_union_map *umap)
 {
        if (!umap)
-               return;
+               return NULL;
 
        if (--umap->ref > 0)
-               return;
+               return NULL;
 
        isl_hash_table_foreach(umap->dim->ctx, &umap->table,
                               &free_umap_entry, NULL);
        isl_hash_table_clear(&umap->table);
        isl_dim_free(umap->dim);
        free(umap);
+       return NULL;
 }
 
-void isl_union_set_free(__isl_take isl_union_set *uset)
+void *isl_union_set_free(__isl_take isl_union_set *uset)
 {
-       isl_union_map_free(uset);
+       return isl_union_map_free(uset);
 }
 
 static int has_dim(const void *entry, const void *val)