summaryrefslogtreecommitdiffstats
path: root/src/H5Iint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Iint.c')
-rw-r--r--src/H5Iint.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/H5Iint.c b/src/H5Iint.c
index 2e1145d..95baa28 100644
--- a/src/H5Iint.c
+++ b/src/H5Iint.c
@@ -179,7 +179,7 @@ H5I_register_type(const H5I_class_t *cls)
if (NULL == H5I_type_info_array_g[cls->type]) {
/* Allocate the type information for new type */
if (NULL == (type_info = (H5I_type_info_t *)H5MM_calloc(sizeof(H5I_type_info_t))))
- HGOTO_ERROR(H5E_ATOM, H5E_CANTALLOC, FAIL, "ID type allocation failed")
+ HGOTO_ERROR(H5E_ID, H5E_CANTALLOC, FAIL, "ID type allocation failed")
H5I_type_info_array_g[cls->type] = type_info;
}
else {
@@ -194,7 +194,7 @@ H5I_register_type(const H5I_class_t *cls)
type_info->nextid = cls->reserved;
type_info->last_id_info = NULL;
if (NULL == (type_info->ids = H5SL_create(H5SL_TYPE_HID, NULL)))
- HGOTO_ERROR(H5E_ATOM, H5E_CANTCREATE, FAIL, "skip list creation failed")
+ HGOTO_ERROR(H5E_ID, H5E_CANTCREATE, FAIL, "skip list creation failed")
}
/* Increment the count of the times this type has been initialized */
@@ -319,7 +319,7 @@ H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref)
udata.type_info = H5I_type_info_array_g[type];
if (udata.type_info == NULL || udata.type_info->init_count <= 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "invalid type")
/* Finish constructing udata */
udata.force = force;
@@ -327,7 +327,7 @@ H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref)
/* Attempt to free all ids in the type */
if (H5SL_try_free_safe(udata.type_info->ids, H5I__clear_type_cb, &udata) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTDELETE, FAIL, "can't free ids in type")
+ HGOTO_ERROR(H5E_ID, H5E_CANTDELETE, FAIL, "can't free ids in type")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -430,7 +430,7 @@ H5I__destroy_type(H5I_type_t type)
type_info = H5I_type_info_array_g[type];
if (type_info == NULL || type_info->init_count <= 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "invalid type")
/* Close/clear/destroy all IDs for this type */
H5E_BEGIN_TRY {
@@ -442,7 +442,7 @@ H5I__destroy_type(H5I_type_t type)
type_info->cls = H5MM_xfree_const(type_info->cls);
if (H5SL_close(type_info->ids) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTCLOSEOBJ, FAIL, "can't close skip list")
+ HGOTO_ERROR(H5E_ID, H5E_CANTCLOSEOBJ, FAIL, "can't close skip list")
type_info->ids = NULL;
type_info = H5MM_xfree(type_info);
@@ -484,9 +484,9 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, H5I_INVALID_HID, "invalid type number")
type_info = H5I_type_info_array_g[type];
if ((NULL == type_info) || (type_info->init_count <= 0))
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, H5I_INVALID_HID, "invalid type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, H5I_INVALID_HID, "invalid type")
if (NULL == (info = H5FL_MALLOC(H5I_id_info_t)))
- HGOTO_ERROR(H5E_ATOM, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed")
+ HGOTO_ERROR(H5E_ID, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed")
/* Create the struct & its ID */
new_id = H5I_MAKE(type, type_info->nextid);
@@ -497,7 +497,7 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref)
/* Insert into the type */
if (H5SL_insert(type_info->ids, info, &info->id) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert ID node into skip list")
+ HGOTO_ERROR(H5E_ID, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert ID node into skip list")
type_info->id_count++;
type_info->nextid++;
@@ -546,7 +546,7 @@ H5I_register_using_existing_id(H5I_type_t type, void *object, hbool_t app_ref, h
/* Make sure ID is not already in use */
if (NULL != (info = H5I__find_id(existing_id)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADRANGE, FAIL, "ID already in use")
+ HGOTO_ERROR(H5E_ID, H5E_BADRANGE, FAIL, "ID already in use")
/* Make sure type number is valid */
if (type <= H5I_BADID || (int)type >= H5I_next_type_g)
@@ -556,15 +556,15 @@ H5I_register_using_existing_id(H5I_type_t type, void *object, hbool_t app_ref, h
type_info = H5I_type_info_array_g[type];
if (NULL == type_info || type_info->init_count <= 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "invalid type")
/* Make sure requested ID belongs to object's type */
if (H5I_TYPE(existing_id) != type)
- HGOTO_ERROR(H5E_ATOM, H5E_BADRANGE, FAIL, "invalid type for provided ID")
+ HGOTO_ERROR(H5E_ID, H5E_BADRANGE, FAIL, "invalid type for provided ID")
/* Allocate new structure to house this ID */
if (NULL == (info = H5FL_MALLOC(H5I_id_info_t)))
- HGOTO_ERROR(H5E_ATOM, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_ID, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Create the struct & insert requested ID */
info->id = existing_id;
@@ -574,7 +574,7 @@ H5I_register_using_existing_id(H5I_type_t type, void *object, hbool_t app_ref, h
/* Insert into the type */
if (H5SL_insert(type_info->ids, info, &info->id) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTINSERT, FAIL, "can't insert ID node into skip list")
+ HGOTO_ERROR(H5E_ID, H5E_CANTINSERT, FAIL, "can't insert ID node into skip list")
type_info->id_count++;
/* Set the most recent ID to this object */
@@ -608,7 +608,7 @@ H5I_subst(hid_t id, const void *new_object)
/* General lookup of the ID */
if (NULL == (info = H5I__find_id(id)))
- HGOTO_ERROR(H5E_ATOM, H5E_NOTFOUND, NULL, "can't get ID ref count")
+ HGOTO_ERROR(H5E_ID, H5E_NOTFOUND, NULL, "can't get ID ref count")
/* Get the old object pointer to return */
H5_GCC_DIAG_OFF("cast-qual")
@@ -830,7 +830,7 @@ H5I__remove_common(H5I_type_info_t *type_info, hid_t id)
/* Get the ID node for the ID */
if (NULL == (info = (H5I_id_info_t *)H5SL_remove(type_info->ids, &id)))
- HGOTO_ERROR(H5E_ATOM, H5E_CANTDELETE, NULL, "can't remove ID node from skip list")
+ HGOTO_ERROR(H5E_ID, H5E_CANTDELETE, NULL, "can't remove ID node from skip list")
/* Check if this ID was the last one accessed */
if (type_info->last_id_info == info)
@@ -876,11 +876,11 @@ H5I_remove(hid_t id)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "invalid type number")
type_info = H5I_type_info_array_g[type];
if (type_info == NULL || type_info->init_count <= 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "invalid type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, NULL, "invalid type")
/* Remove the node from the type */
if (NULL == (ret_value = H5I__remove_common(type_info, id)))
- HGOTO_ERROR(H5E_ATOM, H5E_CANTDELETE, NULL, "can't remove ID node")
+ HGOTO_ERROR(H5E_ID, H5E_CANTDELETE, NULL, "can't remove ID node")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -913,7 +913,7 @@ H5I_dec_ref(hid_t id)
/* General lookup of the ID */
if (NULL == (info = H5I__find_id(id)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "can't locate ID")
+ HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't locate ID")
/* If this is the last reference to the object then invoke the type's
* free method on the object. If the free method is undefined or
@@ -940,7 +940,7 @@ H5I_dec_ref(hid_t id)
if (!type_info->cls->free_func || (type_info->cls->free_func)((void *)info->object) >= 0) {
/* Remove the node from the type */
if (NULL == H5I__remove_common(type_info, id))
- HGOTO_ERROR(H5E_ATOM, H5E_CANTDELETE, (-1), "can't remove ID node")
+ HGOTO_ERROR(H5E_ID, H5E_CANTDELETE, (-1), "can't remove ID node")
ret_value = 0;
} /* end if */
else
@@ -982,7 +982,7 @@ H5I_dec_app_ref(hid_t id)
/* Call regular decrement reference count routine */
if ((ret_value = H5I_dec_ref(id)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTDEC, (-1), "can't decrement ID ref count")
+ HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't decrement ID ref count")
/* Check if the ID still exists */
if (ret_value > 0) {
@@ -990,7 +990,7 @@ H5I_dec_app_ref(hid_t id)
/* General lookup of the ID */
if (NULL == (info = H5I__find_id(id)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "can't locate ID")
+ HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't locate ID")
/* Adjust app_ref */
--(info->app_count);
@@ -1038,7 +1038,7 @@ H5I_dec_app_ref_always_close(hid_t id)
*/
H5I_remove(id);
- HGOTO_ERROR(H5E_ATOM, H5E_CANTDEC, (-1), "can't decrement ID ref count")
+ HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't decrement ID ref count")
}
done:
@@ -1068,7 +1068,7 @@ H5I_inc_ref(hid_t id, hbool_t app_ref)
/* General lookup of the ID */
if (NULL == (info = H5I__find_id(id)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "can't locate ID")
+ HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't locate ID")
/* Adjust reference counts */
++(info->count);
@@ -1105,7 +1105,7 @@ H5I_get_ref(hid_t id, hbool_t app_ref)
/* General lookup of the ID */
if (NULL == (info = H5I__find_id(id)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, (-1), "can't locate ID")
+ HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't locate ID")
/* Set return value */
ret_value = (int)(app_ref ? info->app_count : info->count);
@@ -1138,7 +1138,7 @@ H5I__inc_type_ref(H5I_type_t type)
/* Check arguments */
type_info = H5I_type_info_array_g[type];
if (NULL == type_info)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, (-1), "invalid type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "invalid type")
/* Set return value */
ret_value = (int)(++(type_info->init_count));
@@ -1179,7 +1179,7 @@ H5I_dec_type_ref(H5I_type_t type)
type_info = H5I_type_info_array_g[type];
if (type_info == NULL || type_info->init_count <= 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, (-1), "invalid type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "invalid type")
/* Decrement the number of users of the ID type. If this is the
* last user of the type then release all IDs from the type and
@@ -1224,7 +1224,7 @@ H5I__get_type_ref(H5I_type_t type)
/* Check arguments */
type_info = H5I_type_info_array_g[type];
if (!type_info)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, (-1), "invalid type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "invalid type")
/* Set return value */
ret_value = (int)type_info->init_count;
@@ -1333,7 +1333,7 @@ H5I_iterate(H5I_type_t type, H5I_search_func_t func, void *udata, hbool_t app_re
/* Iterate over IDs */
if ((iter_status = H5SL_iterate(type_info->ids, H5I__iterate_cb, &iter_udata)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADITER, FAIL, "iteration failed")
+ HGOTO_ERROR(H5E_ID, H5E_BADITER, FAIL, "iteration failed")
}
done:
@@ -1448,7 +1448,7 @@ H5I_find_id(const void *object, H5I_type_t type, hid_t *id)
type_info = H5I_type_info_array_g[type];
if (!type_info || type_info->init_count <= 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type")
+ HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "invalid type")
/* Only iterate through ID list if it is initialized and there are IDs in type */
if (type_info->init_count > 0 && type_info->id_count > 0) {
@@ -1462,7 +1462,7 @@ H5I_find_id(const void *object, H5I_type_t type, hid_t *id)
/* Iterate over IDs for the ID type */
if ((iter_status = H5SL_iterate(type_info->ids, H5I__find_id_cb, &udata)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADITER, FAIL, "iteration failed")
+ HGOTO_ERROR(H5E_ID, H5E_BADITER, FAIL, "iteration failed")
*id = udata.ret_id;
}