From 10d6eaa73164b58c91ae8a4537b8a8589038a01d Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 8 Jul 2016 12:04:35 +0200 Subject: Separate close and drop functionality for devices and writers. Closing a device or writer may throw exceptions, but much of the foreign language bindings (JNI and JS) depend on drop to never throw an exception (exceptions in finalizers are bad). --- source/fitz/draw-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/fitz/draw-device.c') diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c index 9a2cb507..ff746e29 100644 --- a/source/fitz/draw-device.c +++ b/source/fitz/draw-device.c @@ -2357,7 +2357,7 @@ fz_draw_end_tile(fz_context *ctx, fz_device *devp) } static void -fz_draw_close(fz_context *ctx, fz_device *devp) +fz_draw_drop_device(fz_context *ctx, fz_device *devp) { fz_draw_device *dev = (fz_draw_device*)devp; fz_gel *gel = dev->gel; @@ -2400,7 +2400,7 @@ fz_new_draw_device(fz_context *ctx, const fz_matrix *transform, fz_pixmap *dest) { fz_draw_device *dev = fz_new_device(ctx, sizeof *dev); - dev->super.close = fz_draw_close; + dev->super.drop_device = fz_draw_drop_device; dev->super.fill_path = fz_draw_fill_path; dev->super.stroke_path = fz_draw_stroke_path; -- cgit v1.2.3