summaryrefslogtreecommitdiff
path: root/platform/java/mupdf_native.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2017-11-22 22:26:32 +0100
committerTor Andersson <tor.andersson@artifex.com>2017-11-22 23:09:51 +0100
commitc01e1a267bac0e053b78fba6ebbd0c199c9adabe (patch)
tree1074c87b59073b4eeff982a82ac8d68cc6b601a3 /platform/java/mupdf_native.c
parent6aed88ce02fa6fa77b4c9b4e91846a6160119335 (diff)
downloadmupdf-c01e1a267bac0e053b78fba6ebbd0c199c9adabe.tar.xz
jni: Remove unnecessary PDFObject.asByteName().
Diffstat (limited to 'platform/java/mupdf_native.c')
-rw-r--r--platform/java/mupdf_native.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c
index 1d9890bb..96d7f742 100644
--- a/platform/java/mupdf_native.c
+++ b/platform/java/mupdf_native.c
@@ -7861,39 +7861,6 @@ FUN(PDFObject_asName)(JNIEnv *env, jobject self)
return (*env)->NewStringUTF(env, str);
}
-JNIEXPORT jobject JNICALL
-FUN(PDFObject_asByteName)(JNIEnv *env, jobject self)
-{
- fz_context *ctx = get_context(env);
- pdf_obj *obj = from_PDFObject(env, self);
- const char *str = NULL;
- jobject jbs = NULL;
- jbyte *bs = NULL;
- size_t len;
-
- if (!ctx || !obj) return NULL;
-
- fz_try(ctx)
- str = pdf_to_name(ctx, obj);
- fz_catch(ctx)
- {
- jni_rethrow(env, ctx);
- return NULL;
- }
-
- len = strlen(str);
- jbs = (*env)->NewByteArray(env, (jsize)len);
- if (!jbs) return NULL;
- bs = (*env)->GetByteArrayElements(env, jbs, NULL);
- if (!bs) return NULL;
-
- memcpy(bs, str, len);
-
- (*env)->ReleaseByteArrayElements(env, jbs, bs, 0);
-
- return jbs;
-}
-
JNIEXPORT jint JNICALL
FUN(PDFObject_size)(JNIEnv *env, jobject self)
{