X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=isl_ctx.c;h=7720be47a7af1cc6474612964707374bad90477d;hb=ca90b151a05f17ccc1c3215ff24dc5d7b9198ff4;hp=e5f1d08224c057efc2307192b82eb319c6e98e7b;hpb=c39e514ed3cb2bee792bd2fbfeaab9ce28e8ec78;p=platform%2Fupstream%2Fisl.git diff --git a/isl_ctx.c b/isl_ctx.c index e5f1d08..7720be4 100644 --- a/isl_ctx.c +++ b/isl_ctx.c @@ -1,7 +1,7 @@ /* * Copyright 2008-2009 Katholieke Universiteit Leuven * - * Use of this software is governed by the GNU LGPLv2.1 license + * Use of this software is governed by the MIT license * * Written by Sven Verdoolaege, K.U.Leuven, Departement * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium @@ -11,6 +11,9 @@ #include #include +#define __isl_calloc(type,size) ((type *)calloc(1, size)) +#define __isl_calloc_type(type) __isl_calloc(type,sizeof(type)) + void isl_handle_error(isl_ctx *ctx, enum isl_error error, const char *msg, const char *file, int line) { @@ -86,7 +89,7 @@ isl_ctx *isl_ctx_alloc_with_options(struct isl_args *args, void *user_opt) opt_allocated = 1; } - ctx = isl_calloc_type(NULL, struct isl_ctx); + ctx = __isl_calloc_type(struct isl_ctx); if (!ctx) goto error; @@ -169,7 +172,7 @@ void isl_ctx_free(struct isl_ctx *ctx) isl_int_clear(ctx->normalize_gcd); isl_args_free(ctx->user_args, ctx->user_opt); if (ctx->opt_allocated) - free(ctx->opt); + isl_options_free(ctx->opt); free(ctx->stats); free(ctx); }