summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-03-01 15:25:43 +0000
committerRobin Watts <robin@ghostscript.com>2012-03-01 15:30:34 +0000
commitc6aa389a2c3430396a5e818bbb849410ab29d617 (patch)
treef1a46dbe7eb2dcedc463a2281b8f41db6102d3f6 /fitz
parent152ce17e73ab54e0f619ec2088b34a4a5e53f421 (diff)
downloadmupdf-c6aa389a2c3430396a5e818bbb849410ab29d617.tar.xz
Setjmp/longjmp exception tweaks.
First, fix a couple of the 'alternative formulations' of the try/catch code in the comments. Secondly, work around a Mac OS X compiler bug.
Diffstat (limited to 'fitz')
-rw-r--r--fitz/fitz.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fitz/fitz.h b/fitz/fitz.h
index 825ed4ba..f72aecb9 100644
--- a/fitz/fitz.h
+++ b/fitz/fitz.h
@@ -210,7 +210,7 @@ execution. Again this was felt to be too high a cost to use.
#define fz_always(ctx) \
} while (0); \
- longjmp(ctx->error->stack[ctx->error->top].buffer, 3); \
+ fz_longjmp(ctx->error->stack[ctx->error->top].buffer, 3); \
} \
else if (ctx->error->stack[ctx->error->top].code & 1) \
{ do {
@@ -218,7 +218,7 @@ execution. Again this was felt to be too high a cost to use.
#define fz_catch(ctx) \
} while(0); \
if (ctx->error->stack[ctx->error->top].code == 1) \
- longjmp(ctx->error->stack[ctx->error->top].buffer, 2); \
+ fz_longjmp(ctx->error->stack[ctx->error->top].buffer, 2); \
ctx->error->top--;\
} \
else if (ctx->error->top--, 1)