diff options
Diffstat (limited to 'fitz')
-rw-r--r-- | fitz/base_error.c | 6 | ||||
-rw-r--r-- | fitz/fitz.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/fitz/base_error.c b/fitz/base_error.c index 71a32a2e..606e9c2a 100644 --- a/fitz/base_error.c +++ b/fitz/base_error.c @@ -43,6 +43,12 @@ void fz_warn(fz_context *ctx, char *fmt, ...) /* Error context */ +int fz_too_deeply_nested(fz_context *ctx) +{ + fz_error_context *ex = ctx->error; + return ex->top + 1 >= nelem(ex->stack); +} + static void throw(fz_error_context *ex) { if (ex->top >= 0) { diff --git a/fitz/fitz.h b/fitz/fitz.h index 266ec549..63278cb1 100644 --- a/fitz/fitz.h +++ b/fitz/fitz.h @@ -255,6 +255,7 @@ void fz_push_try(fz_error_context *ex); void fz_throw(fz_context *, char *, ...) __printflike(2, 3); void fz_rethrow(fz_context *); void fz_warn(fz_context *ctx, char *fmt, ...) __printflike(2, 3); +int fz_too_deeply_nested(fz_context *ctx); /* fz_flush_warnings: Flush any repeated warnings. |