projects
/
platform
/
upstream
/
isl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add isl_qpolynomial_fold_scale_val
[platform/upstream/isl.git]
/
isl_ctx.c
diff --git
a/isl_ctx.c
b/isl_ctx.c
index
10bcbf9
..
7720be4
100644
(file)
--- a/
isl_ctx.c
+++ b/
isl_ctx.c
@@
-1,7
+1,7
@@
/*
* Copyright 2008-2009 Katholieke Universiteit Leuven
*
/*
* 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
*
* Written by Sven Verdoolaege, K.U.Leuven, Departement
* Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
@@
-9,14
+9,20
@@
#include <isl_ctx_private.h>
#include <isl/vec.h>
#include <isl_ctx_private.h>
#include <isl/vec.h>
-#include <isl/options.h>
+#include <isl_options_private.h>
+
+#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)
{
void isl_handle_error(isl_ctx *ctx, enum isl_error error, const char *msg,
const char *file, int line)
{
+ if (!ctx)
+ return;
+
isl_ctx_set_error(ctx, error);
isl_ctx_set_error(ctx, error);
- switch (
isl_options_get_on_error(ctx)
) {
+ switch (
ctx->opt->on_error
) {
case ISL_ON_ERROR_WARN:
fprintf(stderr, "%s:%d: %s\n", file, line, msg);
return;
case ISL_ON_ERROR_WARN:
fprintf(stderr, "%s:%d: %s\n", file, line, msg);
return;
@@
-83,7
+89,7
@@
isl_ctx *isl_ctx_alloc_with_options(struct isl_args *args, void *user_opt)
opt_allocated = 1;
}
opt_allocated = 1;
}
- ctx =
isl_calloc_type(NULL,
struct isl_ctx);
+ ctx =
__isl_calloc_type(
struct isl_ctx);
if (!ctx)
goto error;
if (!ctx)
goto error;
@@
-166,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)
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);
}
free(ctx->stats);
free(ctx);
}