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 18:37:18 (GMT)
commit93f509a2f2d5143450a0e6753325557b2bb8b707 (patch)
tree3f6553e73ef0dba911ed567a15cb10008a06b74a /java/src/jni/h5tImp.c
parent35062073449be67956c3df0a4c6f56cad05e63bf (diff)
downloadhdf5-93f509a2f2d5143450a0e6753325557b2bb8b707.zip
hdf5-93f509a2f2d5143450a0e6753325557b2bb8b707.tar.gz
hdf5-93f509a2f2d5143450a0e6753325557b2bb8b707.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
*/