diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-06-25 14:54:33 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-06-25 14:54:33 (GMT) |
commit | b236c2160102a5ed6dd6bce7b0fea0613424981e (patch) | |
tree | 7ba842dd3453335cb5323c1ee0eeaafcf90e0a12 /src/H5O.c | |
parent | f9312d49d52ba6e6af4549907dd73a4901db6f70 (diff) | |
download | hdf5-b236c2160102a5ed6dd6bce7b0fea0613424981e.zip hdf5-b236c2160102a5ed6dd6bce7b0fea0613424981e.tar.gz hdf5-b236c2160102a5ed6dd6bce7b0fea0613424981e.tar.bz2 |
[svn-r30106] Moved datatype close code to new internal function. H5Oclose()
now supports evict-on-close for datatypes.
Diffstat (limited to 'src/H5O.c')
-rw-r--r-- | src/H5O.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1069,14 +1069,18 @@ H5Oclose(hid_t object_id) /* Get the type of the object and close it in the correct way */ switch(H5I_get_type(object_id)) { case H5I_GROUP: - case H5I_DATATYPE: case H5I_DATASET: if(H5I_object(object_id) == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object") if(H5I_dec_app_ref(object_id) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object") break; - + case H5I_DATATYPE: + if(H5I_object(object_id) == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object") + if(H5T_close_id(object_id) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object") + break; case H5I_UNINIT: case H5I_BADID: case H5I_FILE: |