diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2021-05-05 02:01:23 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2021-05-05 02:01:23 (GMT) |
commit | 8e27e7357506958128d087c4e93e3dcb4fb52ace (patch) | |
tree | aacca527aede81daddad6707c2f9346fc933a773 /src/H5T.c | |
parent | 16eda679e306fde7fec41f5ff1910be86645e745 (diff) | |
download | hdf5-8e27e7357506958128d087c4e93e3dcb4fb52ace.zip hdf5-8e27e7357506958128d087c4e93e3dcb4fb52ace.tar.gz hdf5-8e27e7357506958128d087c4e93e3dcb4fb52ace.tar.bz2 |
Brings atom-->ID and other ID-related changes from develop
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 66 |
1 files changed, 25 insertions, 41 deletions
@@ -325,7 +325,7 @@ /* Adjust information for this type */ \ H5_GLUE3(H5T_INIT_TYPE_, GUTS, _CORE) \ \ - /* Atomize result */ \ + /* Register result */ \ if ((GLOBAL = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype atom") \ } @@ -802,7 +802,7 @@ H5T__init_package(void) FUNC_ENTER_NOAPI_NOINIT - /* Initialize the atom group for the file IDs */ + /* Initialize the ID group for the file IDs */ if (H5I_register_type(H5I_DATATYPE_CLS) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize interface") @@ -1820,7 +1820,7 @@ done: * Errors: * ARGS BADVALUE Invalid size. * DATATYPE CANTINIT Can't create type. - * DATATYPE CANTREGISTER Can't register datatype atom. + * DATATYPE CANTREGISTER Can't register datatype ID. * * Programmer: Robb Matzke * Friday, December 5, 1997 @@ -1923,6 +1923,7 @@ H5Tcopy(hid_t obj_id) case H5I_ERROR_MSG: case H5I_ERROR_STACK: case H5I_SPACE_SEL_ITER: + case H5I_EVENTSET: case H5I_NTYPES: default: HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a datatype or dataset") @@ -1941,7 +1942,7 @@ done: /* If we got a type ID from a passed-in dataset, we need to close that */ if (dset_tid != H5I_INVALID_HID) if (H5I_dec_app_ref(dset_tid) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADATOM, FAIL, "problem freeing temporary dataset type ID") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADID, FAIL, "problem freeing temporary dataset type ID") /* Close the new datatype on errors */ if (H5I_INVALID_HID == ret_value) @@ -1954,12 +1955,12 @@ done: /*------------------------------------------------------------------------- * Function: H5Tclose * - * Purpose: Frees a datatype and all associated memory. + * Purpose: Frees a datatype and all associated memory. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Tuesday, December 9, 1997 + * Programmer: Robb Matzke + * Tuesday, December 9, 1997 *------------------------------------------------------------------------- */ herr_t @@ -1979,7 +1980,7 @@ H5Tclose(hid_t type_id) /* When the reference count reaches zero the resources are freed */ if (H5I_dec_app_ref(type_id) < 0) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "problem freeing id") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "problem freeing id") done: FUNC_LEAVE_API(ret_value) @@ -2037,12 +2038,6 @@ done: * Programmer: Robb Matzke * Friday, January 9, 1998 * - * Modifications: - * - * Robb Matzke, 1 Jun 1998 - * It is illegal to lock a named datatype since we must allow named - * types to be closed (to release file resources) but locking a type - * prevents that. *------------------------------------------------------------------------- */ herr_t @@ -2113,9 +2108,6 @@ done: * Programmer: Robb Matzke * Monday, December 8, 1997 * - * Modifications: - * Broke out from H5Tget_class - QAK - 6/4/99 - * *------------------------------------------------------------------------- */ H5T_class_t @@ -2779,7 +2771,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c for (i = H5T_g.nsoft - 1; i >= 0; --i) { soft = H5T_g.soft + i; HDassert(soft); - if (name && *name && HDstrcmp(name, soft->name)) + if (name && *name && HDstrcmp(name, soft->name) != 0) continue; if (src && src->shared->type != soft->src) continue; @@ -2801,7 +2793,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c /* Not a match */ if (((H5T_PERS_SOFT == pers && path->is_hard) || (H5T_PERS_HARD == pers && !path->is_hard)) || - (name && *name && HDstrcmp(name, path->name)) || (src && H5T_cmp(src, path->src, FALSE)) || + (name && *name && HDstrcmp(name, path->name) != 0) || (src && H5T_cmp(src, path->src, FALSE)) || (dst && H5T_cmp(dst, path->dst, FALSE)) || (func && func != path->conv.u.app_func)) { /* * Notify all other functions to recalculate private data since some @@ -2910,14 +2902,14 @@ done: *------------------------------------------------------------------------- */ H5T_conv_t -H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata) +H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata /*out*/) { H5T_t * src, *dst; H5T_path_t *path; H5T_conv_t ret_value; /* Return value */ FUNC_ENTER_API(NULL) - H5TRACE3("TC", "ii**!", src_id, dst_id, pcdata); + H5TRACE3("TC", "iix", src_id, dst_id, pcdata); /* Check args */ if (NULL == (src = (H5T_t *)H5I_object_verify(src_id, H5I_DATATYPE)) || @@ -3006,7 +2998,7 @@ herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *background, hid_t dxpl_id) { H5T_path_t *tpath; /* type conversion info */ - H5T_t * src, *dst; /* unatomized types */ + H5T_t * src, *dst; /* unregistered types */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) @@ -3134,10 +3126,6 @@ done: * Programmer: Raymond Lu * July 14, 2004 * - * Modification:Raymond Lu - * 17 February 2011 - * I changed the value for the APP_REF parameter of H5I_register - * from FALSE to TRUE. *------------------------------------------------------------------------- */ hid_t @@ -3297,10 +3285,6 @@ done: * Programmer: Robb Matzke * Friday, December 5, 1997 * - * Modifications: - * Raymond Lu - * 19 May 2011 - * We support fixed size or variable-length string now. *------------------------------------------------------------------------- */ H5T_t * @@ -3422,8 +3406,8 @@ done: * Note: Common code for both H5T_copy and H5T_copy_reopen, as part of * the const-correct datatype copying routines. * - * Programmer: David Young - * January 18, 2020 + * Programmer: David Young + * January 18, 2020 * *------------------------------------------------------------------------- */ @@ -3470,8 +3454,8 @@ done: * Return: Success: Pointer to a new copy of the OLD_DT argument. * Failure: NULL * - * Programmer: David Young - * January 18, 2020 + * Programmer: David Young + * January 18, 2020 * *------------------------------------------------------------------------- */ @@ -3498,8 +3482,8 @@ done: * Return: Success: Pointer to a new copy of the OLD_DT argument. * Failure: NULL * - * Programmer: David Young - * January 18, 2020 + * Programmer: David Young + * January 18, 2020 * *------------------------------------------------------------------------- */ @@ -3529,8 +3513,8 @@ done: * * Note: Common code for both H5T_copy and H5T_copy_reopen. * - * Programmer: David Young - * January 18, 2020 + * Programmer: David Young + * January 18, 2020 * *------------------------------------------------------------------------- */ @@ -3800,8 +3784,8 @@ done: * Return: Success: Pointer to a new copy of the OLD_DT argument. * Failure: NULL * - * Programmer: David Young - * January 18, 2020 + * Programmer: David Young + * January 18, 2020 * *------------------------------------------------------------------------- */ |