From: Sven Verdoolaege Date: Sat, 30 Jun 2012 12:47:04 +0000 (+0200) Subject: isl_set_free: return NULL X-Git-Tag: isl-0.11~258 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f8f41422339018d4c3169d34cbc1df10341723bd;p=platform%2Fupstream%2Fisl.git isl_set_free: return NULL Signed-off-by: Sven Verdoolaege --- diff --git a/doc/user.pod b/doc/user.pod index 53725a8..b8770c0 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -1220,7 +1220,7 @@ functions. __isl_give isl_union_map *isl_union_map_copy( __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_set_free(__isl_take isl_set *set); 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); diff --git a/include/isl/set.h b/include/isl/set.h index 6be9ba4..ae45890 100644 --- a/include/isl/set.h +++ b/include/isl/set.h @@ -251,7 +251,7 @@ __isl_give isl_set *isl_set_add_basic_set(__isl_take isl_set *set, __isl_take isl_basic_set *bset); struct isl_set *isl_set_finalize(struct isl_set *set); __isl_give isl_set *isl_set_copy(__isl_keep isl_set *set); -void isl_set_free(__isl_take isl_set *set); +void *isl_set_free(__isl_take isl_set *set); struct isl_set *isl_set_dup(struct isl_set *set); __isl_constructor __isl_give isl_set *isl_set_from_basic_set(__isl_take isl_basic_set *bset); diff --git a/isl_map.c b/isl_map.c index 44a2056..fc4835e 100644 --- a/isl_map.c +++ b/isl_map.c @@ -2471,21 +2471,23 @@ __isl_give isl_set *isl_set_add_basic_set(__isl_take isl_set *set, (struct isl_basic_map *)bset); } -void isl_set_free(struct isl_set *set) +void *isl_set_free(__isl_take isl_set *set) { int i; if (!set) - return; + return NULL; if (--set->ref > 0) - return; + return NULL; isl_ctx_deref(set->ctx); for (i = 0; i < set->n; ++i) isl_basic_set_free(set->p[i]); isl_space_free(set->dim); free(set); + + return NULL; } void isl_set_print_internal(struct isl_set *set, FILE *out, int indent)