diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-07-08 12:04:35 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-07-08 17:21:24 +0200 |
commit | 10d6eaa73164b58c91ae8a4537b8a8589038a01d (patch) | |
tree | 5b739b0c2202b42a9079ee3ecbd98c3d3b09b124 /platform | |
parent | b53e7a42f7cc9756ed9fa1fed313271e3ae67855 (diff) | |
download | mupdf-10d6eaa73164b58c91ae8a4537b8a8589038a01d.tar.xz |
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).
Diffstat (limited to 'platform')
-rw-r--r-- | platform/java/mupdf_native.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c index 5cef1e70..2a52e028 100644 --- a/platform/java/mupdf_native.c +++ b/platform/java/mupdf_native.c @@ -1284,7 +1284,7 @@ fz_java_device_end_tile(fz_context *ctx, fz_device *dev) } static void -fz_java_device_close(fz_context *ctx, fz_device *dev) +fz_java_device_drop(fz_context *ctx, fz_device *dev) { fz_java_device *jdev = (fz_java_device *)dev; JNIEnv *env = jdev->env; @@ -1303,7 +1303,7 @@ static fz_device *fz_new_java_device(fz_context *ctx, JNIEnv *env, jobject self) dev->self = (*env)->NewGlobalRef(env, self); - dev->super.close = fz_java_device_close; + dev->super.drop_device = fz_java_device_drop; dev->super.fill_path = fz_java_device_fill_path; dev->super.stroke_path = fz_java_device_stroke_path; |