diff options
author | Quincey Koziol <koziol@koziol.gov> | 2019-04-25 04:33:56 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@koziol.gov> | 2019-04-25 04:33:56 (GMT) |
commit | 9fadb39656f0d3c6a9392cae70d7a59bb7140bcc (patch) | |
tree | 296048b9a2050b7c5b732b58c3e01012294ee504 /src/H5Adeprec.c | |
parent | 59635ab747f2a9bb83a19ad0d97915bc68ad7129 (diff) | |
download | hdf5-9fadb39656f0d3c6a9392cae70d7a59bb7140bcc.zip hdf5-9fadb39656f0d3c6a9392cae70d7a59bb7140bcc.tar.gz hdf5-9fadb39656f0d3c6a9392cae70d7a59bb7140bcc.tar.bz2 |
Refactor attribute creation parameters to move parameters out of creation
property list and into function parameters.
Diffstat (limited to 'src/H5Adeprec.c')
-rw-r--r-- | src/H5Adeprec.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c index b438cd2..8d0e33c 100644 --- a/src/H5Adeprec.c +++ b/src/H5Adeprec.c @@ -119,7 +119,6 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, void *attr = NULL; /* attr token from VOL connector */ H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */ H5VL_loc_params_t loc_params; - H5P_genplist_t *plist; /* Property list pointer */ hid_t ret_value = H5I_INVALID_HID; /* Return value */ FUNC_ENTER_API(H5I_INVALID_HID) @@ -139,16 +138,6 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, if(H5P_DEFAULT == acpl_id) acpl_id = H5P_ATTRIBUTE_CREATE_DEFAULT; - /* Get the plist structure */ - if(NULL == (plist = (H5P_genplist_t *)H5I_object(acpl_id))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5I_INVALID_HID, "can't find object for ID") - - /* Set creation properties */ - if(H5P_set(plist, H5VL_PROP_ATTR_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_ATTR_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; loc_params.obj_type = H5I_get_type(loc_id); @@ -158,7 +147,7 @@ H5Acreate1(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") /* Create the attribute */ - if(NULL == (attr = H5VL_attr_create(vol_obj, &loc_params, name, acpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) + if(NULL == (attr = H5VL_attr_create(vol_obj, &loc_params, name, type_id, space_id, acpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute") /* Register the new attribute and get an ID for it */ |