From 80540880944bb9c1cdf4d2e955d3f1378dfbacb8 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 7 Nov 2018 14:35:56 +0100 Subject: Add explicit jmp_buf dereferencing to allow using fz_try from C++. --- include/mupdf/fitz/context.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/mupdf/fitz/context.h b/include/mupdf/fitz/context.h index de83d0e6..d8d5bcc0 100644 --- a/include/mupdf/fitz/context.h +++ b/include/mupdf/fitz/context.h @@ -57,12 +57,12 @@ void fz_var_imp(void *); attention to the man behind the curtain. */ -void *fz_push_try(fz_context *ctx); +fz_jmp_buf *fz_push_try(fz_context *ctx); int fz_do_try(fz_context *ctx); int fz_do_always(fz_context *ctx); int fz_do_catch(fz_context *ctx); -#define fz_try(ctx) if (!fz_setjmp(fz_push_try(ctx))) if (fz_do_try(ctx)) do +#define fz_try(ctx) if (!fz_setjmp(*fz_push_try(ctx))) if (fz_do_try(ctx)) do #define fz_always(ctx) while (0); if (fz_do_always(ctx)) do #define fz_catch(ctx) while (0); if (fz_do_catch(ctx)) -- cgit v1.2.3