summaryrefslogtreecommitdiffstats
path: root/src/H5Gobj.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-03-18 23:36:49 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-03-18 23:36:49 (GMT)
commitf38864920d4e0bc8adaf9a23fd3f775ad90cb3f7 (patch)
treeb5f709e5415db2f1a9287b43565fea826b3018f5 /src/H5Gobj.c
parent4a17aff4085ad6ee265b95730aca3f493056dec8 (diff)
parent7aa4eb1b04014f1ad7e1c857ca6509aeeb6c0ae7 (diff)
downloadhdf5-f38864920d4e0bc8adaf9a23fd3f775ad90cb3f7.zip
hdf5-f38864920d4e0bc8adaf9a23fd3f775ad90cb3f7.tar.gz
hdf5-f38864920d4e0bc8adaf9a23fd3f775ad90cb3f7.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5 into merge_func_enter_vol
Plus initial steps toward merging API context push into FUNC_ENTER_API* macros
Diffstat (limited to 'src/H5Gobj.c')
-rw-r--r--src/H5Gobj.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index e38d97c..af0e72c 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -181,7 +181,7 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo,
H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc/*out*/)
{
size_t hdr_size; /* Size of object header to request */
- hbool_t use_latest_format; /* Flag indicating the new group format should be used */
+ hbool_t use_at_least_v18; /* Flag indicating the new group format should be used */
hid_t gcpl_id = gcrt_info->gcpl_id; /* Group creation property list ID */
herr_t ret_value = SUCCEED; /* Return value */
@@ -198,24 +198,23 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo,
/* Check for invalid access request */
if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file")
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file")
- /* Check for using the latest version of the group format */
+ /* Check for using the latest version of the group format which is introduced in v18 */
/* (add more checks for creating "new format" groups when needed) */
- if(H5F_USE_LATEST_FLAGS(f, H5F_LATEST_STYLE_GROUP) || linfo->track_corder
- || (pline && pline->nused))
- use_latest_format = TRUE;
+ if((H5F_LOW_BOUND(f) >= H5F_LIBVER_V18) || linfo->track_corder || (pline && pline->nused))
+ use_at_least_v18 = TRUE;
else
- use_latest_format = FALSE;
+ use_at_least_v18 = FALSE;
/* Make certain that the creation order is being tracked if an index is
* going to be built on it.
*/
if(linfo->index_corder && !linfo->track_corder)
- HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "must track creation order to create index for it")
+ HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "must track creation order to create index for it")
/* Check if we should be using the latest version of the group format */
- if(use_latest_format) {
+ if(use_at_least_v18) {
H5O_link_t lnk; /* Temporary link message info for computing message size */
char null_char = '\0'; /* Character for creating null string */
size_t ginfo_size; /* Size of the group info message */
@@ -261,7 +260,7 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo,
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create header")
/* Check for format of group to create */
- if(use_latest_format) {
+ if(use_at_least_v18) {
/* Insert link info message */
/* (Casting away const OK - QAK) */
if(H5O_msg_create(oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, (void *)linfo) < 0)