summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5tImp.c
diff options
context:
space:
mode:
authorJordan Henderson <jhenderson@hdfgroup.org>2019-10-10 18:37:18 (GMT)
committerJordan Henderson <jhenderson@hdfgroup.org>2019-10-10 21:03:34 (GMT)
commitf3f67a5645d2bbc9631894e93c72809eda4897e0 (patch)
treefac37b3ef1fe43bef6748a478741c9e4a3b38303 /java/src/jni/h5tImp.c
parent3a25a655721f01ed5b6bb4682dd61d27f02b04cd (diff)
downloadhdf5-f3f67a5645d2bbc9631894e93c72809eda4897e0.zip
hdf5-f3f67a5645d2bbc9631894e93c72809eda4897e0.tar.gz
hdf5-f3f67a5645d2bbc9631894e93c72809eda4897e0.tar.bz2
Fix various Java issues when deprecated symbols are disabled
Diffstat (limited to 'java/src/jni/h5tImp.c')
-rw-r--r--java/src/jni/h5tImp.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/java/src/jni/h5tImp.c b/java/src/jni/h5tImp.c
index 460f12e..3302b7d 100644
--- a/java/src/jni/h5tImp.c
+++ b/java/src/jni/h5tImp.c
@@ -980,6 +980,37 @@ done:
/*
* Class: hdf_hdf5lib_H5
+ * Method: H5Treclaim
+ * Signature: (JJJ[B)I
+ */
+JNIEXPORT jint JNICALL
+Java_hdf_hdf5lib_H5_H5Treclaim
+ (JNIEnv *env, jclass clss, jlong type_id, jlong space_id,
+ jlong xfer_plist_id, jbyteArray buf)
+{
+ jboolean bufIsCopy;
+ jbyte *pinBuf = NULL;
+ herr_t status = FAIL;
+
+ UNUSED(clss);
+
+ if (NULL == buf)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Treclaim: buffer is NULL");
+
+ PIN_BYTE_ARRAY(ENVONLY, buf, pinBuf, &bufIsCopy, "H5Treclaim: buffer not pinned");
+
+ if ((status = H5Treclaim((hid_t)type_id, (hid_t)space_id, (hid_t)xfer_plist_id, pinBuf)) < 0)
+ H5_LIBRARY_ERROR(ENVONLY);
+
+done:
+ if (pinBuf)
+ UNPIN_BYTE_ARRAY(ENVONLY, buf, pinBuf, (status < 0) ? JNI_ABORT : 0);
+
+ return (jint)status;
+} /* end Java_hdf_hdf5lib_H5_H5Treclaim */
+
+/*
+ * Class: hdf_hdf5lib_H5
* Method: _H5Tclose
* Signature: (J)I
*/