diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-01-02 20:38:30 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-01-02 20:38:30 (GMT) |
commit | c820502e69b8c3222bbf1162d21820bebcf71202 (patch) | |
tree | aa5e272e4a5c02a43bdb38ee18fc650537a3de7d /java/src/jni/h5fImp.c | |
parent | c70498f7a919644000966616c3ff152dcedf3392 (diff) | |
parent | ed0c468902409ae7fa8fb91c5f5a3a3093846736 (diff) | |
download | hdf5-c820502e69b8c3222bbf1162d21820bebcf71202.zip hdf5-c820502e69b8c3222bbf1162d21820bebcf71202.tar.gz hdf5-c820502e69b8c3222bbf1162d21820bebcf71202.tar.bz2 |
Merge pull request #1421 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'ed0c468902409ae7fa8fb91c5f5a3a3093846736':
HDFFV-10664 add check for state before set call
HDFFV-10546 refactor variable name
HDFFV-10664 minimized dataset headers for java interface
Diffstat (limited to 'java/src/jni/h5fImp.c')
-rw-r--r-- | java/src/jni/h5fImp.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c index 248e654..7f10ca5 100644 --- a/java/src/jni/h5fImp.c +++ b/java/src/jni/h5fImp.c @@ -636,6 +636,50 @@ Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status } /* end else */ } /* end Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status */ +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Fset_dset_no_attrs_hint + * Signature: (JZ)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Fset_1dset_1no_1attrs_1hint +(JNIEnv *env, jclass clss, jlong file_id, jboolean minimize) +{ + herr_t retVal = -1; + hbool_t minimize_val; + + if (minimize == JNI_TRUE) + minimize_val = TRUE; + else + minimize_val = FALSE; + + retVal = H5Fset_dset_no_attrs_hint((hid_t)file_id, (hbool_t)minimize_val); + if (retVal < 0) + h5libraryError(env); +} + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Fget_dset_no_attrs_hint + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5Fget_1dset_1no_1attrs_1hint +(JNIEnv *env, jclass clss, jlong file_id) +{ + hbool_t minimize = FALSE; + jboolean bval = JNI_FALSE; + + if (H5Fget_dset_no_attrs_hint((hid_t)file_id, (hbool_t *)&minimize) < 0) { + h5libraryError(env); + } + else { + if (minimize == TRUE) + bval = JNI_TRUE; + } /* end else */ + + return bval; +} #ifdef __cplusplus |