summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5pImp.c
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/jni/h5pImp.c')
-rw-r--r--java/src/jni/h5pImp.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c
index f4fee74..d542902 100644
--- a/java/src/jni/h5pImp.c
+++ b/java/src/jni/h5pImp.c
@@ -2162,24 +2162,26 @@ Java_hdf_hdf5lib_H5_H5Pset(JNIEnv *env, jclass clss, jlong plid, jstring name, j
/*
* Class: hdf_hdf5lib_H5
* Method: H5Pexist
- * Signature: (JLjava/lang/String;)J
+ * Signature: (JLjava/lang/String;)Z
*/
-JNIEXPORT jlong JNICALL
+JNIEXPORT jboolean JNICALL
Java_hdf_hdf5lib_H5_H5Pexist(JNIEnv *env, jclass clss, jlong plid, jstring name)
{
- hid_t retVal = -1;
+ htri_t bval = JNI_FALSE;
const char *cstr;
PIN_JAVA_STRING(name, cstr, -1);
- retVal = H5Pexist((hid_t)plid, cstr);
+ bval = H5Pexist((hid_t)plid, cstr);
UNPIN_JAVA_STRING(name, cstr);
- if (retVal < 0)
+ if (bval > 0)
+ bval = JNI_TRUE;
+ else if (bval < 0)
h5libraryError(env);
- return (jlong)retVal;
+ return (jboolean)bval;
} /* end Java_hdf_hdf5lib_H5_H5Pexist */
/*