From 1c41e2728af8a37eb16e7a70dad857e0fe47f22c Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Thu, 6 Sep 2018 19:37:58 +0800 Subject: jni: Depend on fz_buffer() for default buffer size. --- platform/java/mupdf_native.h | 2 -- platform/java/src/com/artifex/mupdf/fitz/Buffer.java | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/platform/java/mupdf_native.h b/platform/java/mupdf_native.h index 83b8317c..144bfefb 100644 --- a/platform/java/mupdf_native.h +++ b/platform/java/mupdf_native.h @@ -66,8 +66,6 @@ JNIEXPORT jlong JNICALL Java_com_artifex_mupdf_fitz_Annotation_advance #ifdef __cplusplus extern "C" { #endif -#undef com_artifex_mupdf_fitz_Buffer_DEFAULT_BUFFER_SIZE -#define com_artifex_mupdf_fitz_Buffer_DEFAULT_BUFFER_SIZE 1024L /* * Class: com_artifex_mupdf_fitz_Buffer * Method: finalize diff --git a/platform/java/src/com/artifex/mupdf/fitz/Buffer.java b/platform/java/src/com/artifex/mupdf/fitz/Buffer.java index c98e9985..252ab5d0 100644 --- a/platform/java/src/com/artifex/mupdf/fitz/Buffer.java +++ b/platform/java/src/com/artifex/mupdf/fitz/Buffer.java @@ -6,8 +6,6 @@ public class Buffer Context.init(); } - public static final int DEFAULT_BUFFER_SIZE = 1024; - private long pointer; protected native void finalize(); @@ -24,7 +22,7 @@ public class Buffer } public Buffer() { - pointer = newNativeBuffer(DEFAULT_BUFFER_SIZE); + pointer = newNativeBuffer(0); } public native int getLength(); -- cgit v1.2.3