diff options
Diffstat (limited to 'java/src/jni/h5tImp.c')
-rw-r--r-- | java/src/jni/h5tImp.c | 31 |
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 */ |