summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
authorSongyu Lu <songyulu@hdfgroup.org>2019-03-22 14:53:15 (GMT)
committerSongyu Lu <songyulu@hdfgroup.org>2019-03-22 14:53:15 (GMT)
commit9622aac313d38196b7f879f87bd0a3920e4af103 (patch)
tree27fc2bf8d034ad54137a53e74a7e135a5007e5bc /src/H5D.c
parent594cd935435d36801bee3dbb7fc531df7d398bcc (diff)
downloadhdf5-9622aac313d38196b7f879f87bd0a3920e4af103.zip
hdf5-9622aac313d38196b7f879f87bd0a3920e4af103.tar.gz
hdf5-9622aac313d38196b7f879f87bd0a3920e4af103.tar.bz2
HDFFV-10658: 1. moving HDgetenv to dataset initialization stage to reduce the overhead; 2. restoring the retrieval of three vol properties to H5P_get instead of using API context to prepare for Quincey's upcoming refactoring work.
Diffstat (limited to 'src/H5D.c')
-rw-r--r--src/H5D.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/H5D.c b/src/H5D.c
index a50518d..413be37 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -151,9 +151,12 @@ H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
/* Set creation properties */
- H5CX_set_vl_prop_dset_type_id(type_id);
- H5CX_set_vl_prop_dset_space_id(space_id);
- H5CX_set_vl_prop_dset_lcpl_id(lcpl_id);
+ if(H5P_set(plist, H5VL_PROP_DSET_TYPE_ID, &type_id) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for datatype id")
+ if(H5P_set(plist, H5VL_PROP_DSET_SPACE_ID, &space_id) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for space id")
+ if(H5P_set(plist, H5VL_PROP_DSET_LCPL_ID, &lcpl_id) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for lcpl id")
/* Set location parameters */
loc_params.type = H5VL_OBJECT_BY_SELF;
@@ -244,8 +247,10 @@ H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id,
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5I_INVALID_HID, "can't find object for ID")
/* set creation properties */
- H5CX_set_vl_prop_dset_type_id(type_id);
- H5CX_set_vl_prop_dset_space_id(space_id);
+ if(H5P_set(plist, H5VL_PROP_DSET_TYPE_ID, &type_id) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for datatype id")
+ if(H5P_set(plist, H5VL_PROP_DSET_SPACE_ID, &space_id) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for space id")
/* Set location parameters */
loc_params.type = H5VL_OBJECT_BY_SELF;