diff options
author | Chris Hogan <chogan@hdfgroup.org> | 2019-10-28 21:24:54 (GMT) |
---|---|---|
committer | Chris Hogan <chogan@hdfgroup.org> | 2019-10-29 16:46:48 (GMT) |
commit | f8ab081b1f1abcbf76c151d7960ee97a556b4be9 (patch) | |
tree | d973514a5217823c70b29499f569dccb709afa7e /src/H5L.c | |
parent | afd4b291315e39e3966eadaf8ae9894b30e9504e (diff) | |
download | hdf5-f8ab081b1f1abcbf76c151d7960ee97a556b4be9.zip hdf5-f8ab081b1f1abcbf76c151d7960ee97a556b4be9.tar.gz hdf5-f8ab081b1f1abcbf76c151d7960ee97a556b4be9.tar.bz2 |
Use API context to store/retrieve LCPL when creating intermediate groups
Diffstat (limited to 'src/H5L.c')
-rw-r--r-- | src/H5L.c | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -473,10 +473,13 @@ H5Lcreate_soft(const char *link_target, hid_t link_loc_id, const char *link_name if(lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list") - /* Check the group access property list */ + /* Get the link creation property list */ if(H5P_DEFAULT == lcpl_id) lcpl_id = H5P_LINK_CREATE_DEFAULT; + /* Set the LCPL for the API context */ + H5CX_set_lcpl(lcpl_id); + /* Set location fields */ loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.loc_data.loc_by_name.name = link_name; @@ -549,6 +552,9 @@ H5Lcreate_hard(hid_t cur_loc_id, const char *cur_name, if(H5P_DEFAULT == lcpl_id) lcpl_id = H5P_LINK_CREATE_DEFAULT; + /* Set the LCPL for the API context */ + H5CX_set_lcpl(lcpl_id); + /* Verify access property list and set up collective metadata if appropriate */ if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, cur_loc_id, TRUE) < 0) HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") @@ -635,10 +641,13 @@ H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type, if(!udata && udata_size) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "udata cannot be NULL if udata_size is non-zero") - /* Check the group access property list */ + /* Get the link creation property list */ if(H5P_DEFAULT == lcpl_id) lcpl_id = H5P_LINK_CREATE_DEFAULT; + /* Set the LCPL for the API context */ + H5CX_set_lcpl(lcpl_id); + /* Verify access property list and set up collective metadata if appropriate */ if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, TRUE) < 0) HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") @@ -1992,8 +2001,8 @@ H5L__create_real(const H5G_loc_t *link_loc, const char *link_name, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") /* Get intermediate group creation property */ - if(H5P_get(lc_plist, H5L_CRT_INTERMEDIATE_GROUP_NAME, &crt_intmd_group) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for creating missing groups") + if(H5CX_get_create_intermediate_group(&crt_intmd_group) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get 'create intermediate group' property") if(crt_intmd_group > 0) target_flags |= H5G_CRT_INTMD_GROUP; |