diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-11-29 04:13:02 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-11-29 04:13:02 (GMT) |
commit | 2f3344a0495c09448e7fac023c8d91a567110a48 (patch) | |
tree | a060e469e3129f63e63ffa1d6e2813bd6d9e1436 /src/H5Gtraverse.c | |
parent | 1b16195060d142f4e78a447d1ea360401bcf722d (diff) | |
download | hdf5-2f3344a0495c09448e7fac023c8d91a567110a48.zip hdf5-2f3344a0495c09448e7fac023c8d91a567110a48.tar.gz hdf5-2f3344a0495c09448e7fac023c8d91a567110a48.tar.bz2 |
[svn-r12994] Description:
Propagate object creation properties up into group, dataset and named
datatype property lists, when those property lists are retrieved for
existing objects in a file.
Also, add H5Tget_create_plist() API routine, to allow named datatype
property lists to be retrieved for named datatypes.
Tested on:
FreeBSD/32 4.11 (sleipnir)
Linux/32 2.4 (heping)
Linux/64 2.4 (mir)
AIX/32 5.? (copper)
Diffstat (limited to 'src/H5Gtraverse.c')
-rw-r--r-- | src/H5Gtraverse.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c index ff5f9c0..8047eb6 100644 --- a/src/H5Gtraverse.c +++ b/src/H5Gtraverse.c @@ -691,36 +691,40 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, if(lookup_status < 0) { /* If an intermediate group doesn't exist & flag is set, create the group */ if(target & H5G_CRT_INTMD_GROUP) { - H5O_ginfo_t ginfo; /* Group info message for parent group */ - H5O_linfo_t linfo; /* Link info message for parent group */ + const H5O_ginfo_t def_ginfo = H5G_CRT_GROUP_INFO_DEF; /* Default group info settings */ + const H5O_linfo_t def_linfo = H5G_CRT_LINK_INFO_DEF; /* Default link info settings */ + H5O_ginfo_t par_ginfo; /* Group info settings for parent group */ + H5O_linfo_t par_linfo; /* Link info settings for parent group */ + const H5O_ginfo_t *ginfo; /* Group info settings for new group */ + const H5O_linfo_t *linfo; /* Link info settings for new group */ /* Get the group info for parent group */ /* (OK if not found) */ - if(NULL == H5O_read(grp_loc.oloc, H5O_GINFO_ID, 0, &ginfo, dxpl_id)) { - H5O_ginfo_t def_ginfo = H5G_CRT_GROUP_INFO_DEF; - + if(NULL == H5O_read(grp_loc.oloc, H5O_GINFO_ID, 0, &par_ginfo, dxpl_id)) { /* Clear error stack from not finding the group info message */ H5E_clear_stack(NULL); /* Use default group info settings */ - HDmemcpy(&ginfo, &def_ginfo, sizeof(H5O_ginfo_t)); + ginfo = &def_ginfo; } /* end if */ + else + ginfo = &par_ginfo; /* Get the link info for parent group */ /* (OK if not found) */ - if(NULL == H5O_read(grp_loc.oloc, H5O_LINFO_ID, 0, &linfo, dxpl_id)) { - H5O_linfo_t def_linfo = H5G_CRT_LINK_INFO_DEF; - + if(NULL == H5O_read(grp_loc.oloc, H5O_LINFO_ID, 0, &par_linfo, dxpl_id)) { /* Clear error stack from not finding the link info message */ H5E_clear_stack(NULL); /* Use default link info settings */ - HDmemcpy(&linfo, &def_linfo, sizeof(H5O_linfo_t)); + linfo = &def_linfo; } /* end if */ + else + linfo = &par_linfo; /* Create the intermediate group */ /* XXX: Should we allow user to control the group creation params here? -QAK */ - if(H5G_obj_create(grp_oloc.file, dxpl_id, &ginfo, &linfo, obj_loc.oloc/*out*/) < 0) + if(H5G_obj_create(grp_oloc.file, dxpl_id, ginfo, linfo, H5P_GROUP_CREATE_DEFAULT, obj_loc.oloc/*out*/) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry") /* Insert new group into current group's symbol table */ |