summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c222
1 files changed, 111 insertions, 111 deletions
diff --git a/src/H5T.c b/src/H5T.c
index b8b1f37..fe23b04 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -18,7 +18,7 @@ static char RcsId[] = "@(#)$Revision$";
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
#include <H5private.h> /*generic functions */
-#include <H5Aprivate.h> /*atom functions */
+#include <H5Iprivate.h> /*ID functions */
#include <H5Eprivate.h> /*error handling */
#include <H5MMprivate.h> /*memory management */
#include <H5Sprivate.h> /*data space */
@@ -93,7 +93,7 @@ H5T_init_interface(void)
FUNC_ENTER(H5T_init_interface, FAIL);
/* Initialize the atom group for the file IDs */
- if ((ret_value = H5A_init_group(H5_DATATYPE, H5A_DATATYPEID_HASHSIZE,
+ if ((ret_value = H5I_init_group(H5_DATATYPE, H5I_DATATYPEID_HASHSIZE,
H5T_RESERVED_ATOMS,
(herr_t (*)(void *)) H5T_close)) != FAIL) {
ret_value = H5_add_exit(&H5T_term_interface);
@@ -170,7 +170,7 @@ H5T_init_interface(void)
dt->u.atomic.prec = 8 * dt->size;
dt->u.atomic.lsb_pad = H5T_PAD_ZERO;
dt->u.atomic.msb_pad = H5T_PAD_ZERO;
- if ((H5T_NATIVE_TIME_g = H5A_register(H5_DATATYPE, dt)) < 0) {
+ if ((H5T_NATIVE_TIME_g = H5I_register(H5_DATATYPE, dt)) < 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"can't initialize H5T layer");
}
@@ -187,7 +187,7 @@ H5T_init_interface(void)
dt->u.atomic.msb_pad = H5T_PAD_ZERO;
dt->u.atomic.u.s.cset = H5T_CSET_ASCII;
dt->u.atomic.u.s.pad = H5T_STR_NULL;
- if ((H5T_NATIVE_STRING_g = H5A_register(H5_DATATYPE, dt)) < 0) {
+ if ((H5T_NATIVE_STRING_g = H5I_register(H5_DATATYPE, dt)) < 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"can't initialize H5T layer");
}
@@ -202,7 +202,7 @@ H5T_init_interface(void)
dt->u.atomic.prec = 8 * dt->size;
dt->u.atomic.lsb_pad = H5T_PAD_ZERO;
dt->u.atomic.msb_pad = H5T_PAD_ZERO;
- if ((H5T_NATIVE_BITFIELD_g = H5A_register(H5_DATATYPE, dt)) < 0) {
+ if ((H5T_NATIVE_BITFIELD_g = H5I_register(H5_DATATYPE, dt)) < 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to initialize H5T layer");
}
@@ -217,7 +217,7 @@ H5T_init_interface(void)
dt->u.atomic.prec = 8 * dt->size;
dt->u.atomic.lsb_pad = H5T_PAD_ZERO;
dt->u.atomic.msb_pad = H5T_PAD_ZERO;
- if ((H5T_NATIVE_OPAQUE_g = H5A_register(H5_DATATYPE, dt)) < 0) {
+ if ((H5T_NATIVE_OPAQUE_g = H5I_register(H5_DATATYPE, dt)) < 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to initialize H5T layer");
}
@@ -308,7 +308,7 @@ H5T_term_interface(void)
(cfunc)(FAIL, FAIL, pcdata, 0, NULL, NULL);
}
- H5A_destroy_group(H5_DATATYPE);
+ H5I_destroy_group(H5_DATATYPE);
H5T_NATIVE_CHAR_g = FAIL;
H5T_NATIVE_UCHAR_g = FAIL;
H5T_NATIVE_SHORT_g = FAIL;
@@ -376,7 +376,7 @@ H5Tcreate(H5T_class_t type, size_t size)
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't create type");
}
/* Make it an atom */
- if ((ret_value = H5A_register(H5_DATATYPE, dt)) < 0) {
+ if ((ret_value = H5I_register(H5_DATATYPE, dt)) < 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL,
"can't register data type atom");
}
@@ -411,8 +411,8 @@ H5Tcopy(hid_t type_id)
FUNC_ENTER(H5Tcopy, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id))) {
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id))) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
}
@@ -421,7 +421,7 @@ H5Tcopy(hid_t type_id)
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't copy");
}
/* atomize result */
- if ((ret_value = H5A_register(H5_DATATYPE, new_dt)) < 0) {
+ if ((ret_value = H5I_register(H5_DATATYPE, new_dt)) < 0) {
H5T_close(new_dt);
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL,
"can't register data type atom");
@@ -453,15 +453,15 @@ H5Tclose(hid_t type_id)
FUNC_ENTER(H5Tclose, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id))) {
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id))) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
}
if (dt->locked) {
HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "predefined data type");
}
/* When the reference count reaches zero the resources are freed */
- if (H5A_dec_ref(type_id) < 0) {
+ if (H5I_dec_ref(type_id) < 0) {
HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "problem freeing id");
}
FUNC_LEAVE(SUCCEED);
@@ -495,10 +495,10 @@ H5Tequal(hid_t type1_id, hid_t type2_id)
FUNC_ENTER(H5Tequal, FAIL);
/* check args */
- if (H5_DATATYPE != H5A_group(type1_id) ||
- NULL == (dt1 = H5A_object(type1_id)) ||
- H5_DATATYPE != H5A_group(type2_id) ||
- NULL == (dt2 = H5A_object(type2_id))) {
+ if (H5_DATATYPE != H5I_group(type1_id) ||
+ NULL == (dt1 = H5I_object(type1_id)) ||
+ H5_DATATYPE != H5I_group(type2_id) ||
+ NULL == (dt2 = H5I_object(type2_id))) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
}
ret_value = (0 == H5T_cmp(dt1, dt2)) ? TRUE : FALSE;
@@ -535,8 +535,8 @@ H5Tlock(hid_t type_id)
FUNC_ENTER(H5Tlock, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id))) {
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id))) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
}
dt->locked = TRUE;
@@ -568,8 +568,8 @@ H5Tget_class(hid_t type_id)
FUNC_ENTER(H5Tget_class, H5T_NO_CLASS);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id))) {
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id))) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NO_CLASS, "not a data type");
}
FUNC_LEAVE(dt->type);
@@ -602,8 +602,8 @@ H5Tget_size(hid_t type_id)
FUNC_ENTER(H5Tget_size, 0);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id))) {
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id))) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a data type");
}
/* size */
@@ -649,8 +649,8 @@ H5Tset_size(hid_t type_id, size_t size)
FUNC_ENTER(H5Tset_size, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
!H5T_is_atomic(dt)) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an atomic data type");
}
@@ -745,8 +745,8 @@ H5Tget_order(hid_t type_id)
FUNC_ENTER(H5Tget_order, H5T_ORDER_ERROR);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
!H5T_is_atomic(dt)) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_ORDER_ERROR,
"not an atomic data type");
@@ -781,8 +781,8 @@ H5Tset_order(hid_t type_id, H5T_order_t order)
FUNC_ENTER(H5Tset_order, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
!H5T_is_atomic(dt)) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an atomic data type");
}
@@ -826,8 +826,8 @@ H5Tget_precision(hid_t type_id)
FUNC_ENTER(H5Tget_precision, 0);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
!H5T_is_atomic(dt)) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not an atomic data type");
}
@@ -876,8 +876,8 @@ H5Tset_precision(hid_t type_id, size_t prec)
FUNC_ENTER(H5Tset_prec, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
!H5T_is_atomic(dt)) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an atomic data type");
}
@@ -982,8 +982,8 @@ H5Tget_offset(hid_t type_id)
FUNC_ENTER(H5Tget_offset, 0);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
!H5T_is_atomic(dt)) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not an atomic data type");
}
@@ -1040,8 +1040,8 @@ H5Tset_offset(hid_t type_id, size_t offset)
FUNC_ENTER(H5Tset_offset, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
!H5T_is_atomic(dt)) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an atomic data type");
}
@@ -1088,8 +1088,8 @@ H5Tget_pad(hid_t type_id, H5T_pad_t *lsb /*out */ , H5T_pad_t *msb /*out */ )
FUNC_ENTER(H5Tget_pad, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
!H5T_is_atomic(dt)) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an atomic data type");
}
@@ -1126,8 +1126,8 @@ H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb)
FUNC_ENTER(H5Tset_pad, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
!H5T_is_atomic(dt)) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an atomic data type");
}
@@ -1168,8 +1168,8 @@ H5Tget_sign(hid_t type_id)
FUNC_ENTER(H5Tget_sign, H5T_SGN_ERROR);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_INTEGER != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_SGN_ERROR,
"not an integer data type");
@@ -1204,8 +1204,8 @@ H5Tset_sign(hid_t type_id, H5T_sign_t sign)
FUNC_ENTER(H5Tset_sign, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_INTEGER != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an integer data type");
}
@@ -1252,8 +1252,8 @@ H5Tget_fields(hid_t type_id, size_t *spos /*out */ ,
FUNC_ENTER(H5Tget_fields, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_FLOAT != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
"not a floating-point data type");
@@ -1304,8 +1304,8 @@ H5Tset_fields(hid_t type_id, size_t spos, size_t epos, size_t esize,
FUNC_ENTER(H5Tset_fields, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_FLOAT != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
"not a floating-point data type");
@@ -1374,8 +1374,8 @@ H5Tget_ebias(hid_t type_id)
FUNC_ENTER(H5Tget_ebias, 0);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_FLOAT != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, 0,
"not a floating-point data type");
@@ -1410,8 +1410,8 @@ H5Tset_ebias(hid_t type_id, size_t ebias)
FUNC_ENTER(H5Tset_ebias, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_FLOAT != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
"not a floating-point data type");
@@ -1450,8 +1450,8 @@ H5Tget_norm(hid_t type_id)
FUNC_ENTER(H5Tget_norm, H5T_NORM_ERROR);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_FLOAT != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NORM_ERROR,
"not a floating-point data type");
@@ -1487,8 +1487,8 @@ H5Tset_norm(hid_t type_id, H5T_norm_t norm)
FUNC_ENTER(H5Tset_norm, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_FLOAT != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
"not a floating-point data type");
@@ -1532,8 +1532,8 @@ H5Tget_inpad(hid_t type_id)
FUNC_ENTER(H5Tget_inpad, H5T_PAD_ERROR);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_FLOAT != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_PAD_ERROR,
"not a floating-point data type");
@@ -1571,8 +1571,8 @@ H5Tset_inpad(hid_t type_id, H5T_pad_t pad)
FUNC_ENTER(H5Tset_inpad, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_FLOAT != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
"not a floating-point data type");
@@ -1616,8 +1616,8 @@ H5Tget_cset(hid_t type_id)
FUNC_ENTER(H5Tget_cset, H5T_CSET_ERROR);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_STRING != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_CSET_ERROR,
"not a string data type");
@@ -1654,8 +1654,8 @@ H5Tset_cset(hid_t type_id, H5T_cset_t cset)
FUNC_ENTER(H5Tset_cset, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_STRING != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a string data type");
}
@@ -1699,8 +1699,8 @@ H5Tget_strpad(hid_t type_id)
FUNC_ENTER(H5Tget_strpad, H5T_STR_ERROR);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_STRING != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_STR_ERROR,
"not a string data type");
@@ -1738,8 +1738,8 @@ H5Tset_strpad(hid_t type_id, H5T_str_t strpad)
FUNC_ENTER(H5Tset_strpad, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_STRING != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a string data type");
}
@@ -1782,8 +1782,8 @@ H5Tget_nmembers(hid_t type_id)
FUNC_ENTER(H5Tget_num_members, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_COMPOUND != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a compound data type");
}
@@ -1819,8 +1819,8 @@ H5Tget_member_name(hid_t type_id, int membno)
FUNC_ENTER(H5Tget_member_name, NULL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_COMPOUND != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a compound data type");
}
@@ -1860,8 +1860,8 @@ H5Tget_member_offset(hid_t type_id, int membno)
FUNC_ENTER(H5Tget_member_offset, 0);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_COMPOUND != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a compound data type");
}
@@ -1901,8 +1901,8 @@ H5Tget_member_dims(hid_t type_id, int membno,
FUNC_ENTER(H5Tget_member_dims, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_COMPOUND != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a compound data type");
}
@@ -1949,8 +1949,8 @@ H5Tget_member_type(hid_t type_id, int membno)
FUNC_ENTER(H5Tget_member_type, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_COMPOUND != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a compound data type");
}
@@ -1962,7 +1962,7 @@ H5Tget_member_type(hid_t type_id, int membno)
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to copy member data type");
}
- if ((memb_type_id = H5A_register(H5_DATATYPE, memb_dt)) < 0) {
+ if ((memb_type_id = H5I_register(H5_DATATYPE, memb_dt)) < 0) {
H5T_close(memb_dt);
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL,
"can't register data type atom");
@@ -2007,8 +2007,8 @@ H5Tinsert(hid_t parent_id, const char *name, off_t offset, hid_t member_id)
FUNC_ENTER(H5Tinsert, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(parent_id) ||
- NULL == (parent = H5A_object(parent_id)) ||
+ if (H5_DATATYPE != H5I_group(parent_id) ||
+ NULL == (parent = H5I_object(parent_id)) ||
H5T_COMPOUND != parent->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a compound data type");
}
@@ -2018,8 +2018,8 @@ H5Tinsert(hid_t parent_id, const char *name, off_t offset, hid_t member_id)
if (!name || !*name) {
HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no member name");
}
- if (H5_DATATYPE != H5A_group(member_id) ||
- NULL == (member = H5A_object(member_id))) {
+ if (H5_DATATYPE != H5I_group(member_id) ||
+ NULL == (member = H5I_object(member_id))) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
}
if (H5T_insert(parent, name, offset, member) < 0) {
@@ -2054,8 +2054,8 @@ H5Tpack(hid_t type_id)
FUNC_ENTER(H5Tpack, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(type_id) ||
- NULL == (dt = H5A_object(type_id)) ||
+ if (H5_DATATYPE != H5I_group(type_id) ||
+ NULL == (dt = H5I_object(type_id)) ||
H5T_COMPOUND != dt->type) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a compound data type");
}
@@ -2105,10 +2105,10 @@ H5Tregister_hard(hid_t src_id, hid_t dst_id, H5T_conv_t func)
FUNC_ENTER(H5Tregister_hard, FAIL);
/* Check args */
- if (H5_DATATYPE != H5A_group(src_id) ||
- NULL == (src = H5A_object(src_id)) ||
- H5_DATATYPE != H5A_group(dst_id) ||
- NULL == (dst = H5A_object(dst_id))) {
+ if (H5_DATATYPE != H5I_group(src_id) ||
+ NULL == (src = H5I_object(src_id)) ||
+ H5_DATATYPE != H5I_group(dst_id) ||
+ NULL == (dst = H5I_object(dst_id))) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
}
@@ -2198,8 +2198,8 @@ H5Tregister_soft(H5T_class_t src_cls, H5T_class_t dst_cls, H5T_conv_t func)
* data type temporarily to an object id before we query the functions
* capabilities.
*/
- if ((src_id = H5A_register(H5_DATATYPE, H5T_copy(path->src))) < 0 ||
- (dst_id = H5A_register(H5_DATATYPE, H5T_copy(path->dst))) < 0) {
+ if ((src_id = H5I_register(H5_DATATYPE, H5T_copy(path->src))) < 0 ||
+ (dst_id = H5I_register(H5_DATATYPE, H5T_copy(path->dst))) < 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL,
"unable to register data types for conv query");
}
@@ -2228,8 +2228,8 @@ H5Tregister_soft(H5T_class_t src_cls, H5T_class_t dst_cls, H5T_conv_t func)
}
/* Release temporary atoms */
- H5A_dec_ref(src_id);
- H5A_dec_ref(dst_id);
+ H5I_dec_ref(src_id);
+ H5I_dec_ref(dst_id);
H5E_clear();
}
@@ -2310,9 +2310,9 @@ H5Tunregister(H5T_conv_t func)
* Conversion functions are app-level, so temporarily create
* object id's for the data types.
*/
- if ((src_id = H5A_register(H5_DATATYPE,
+ if ((src_id = H5I_register(H5_DATATYPE,
H5T_copy(path->src))) < 0 ||
- (dst_id = H5A_register(H5_DATATYPE,
+ (dst_id = H5I_register(H5_DATATYPE,
H5T_copy(path->dst))) < 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL,
"unable to register conv types for query");
@@ -2326,8 +2326,8 @@ H5Tunregister(H5T_conv_t func)
H5E_clear();
HDmemset (&(path->cdata), 0, sizeof(H5T_cdata_t));
}
- H5A_dec_ref(src_id);
- H5A_dec_ref(dst_id);
+ H5I_dec_ref(src_id);
+ H5I_dec_ref(dst_id);
}
} else {
/*
@@ -2370,10 +2370,10 @@ H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata)
FUNC_ENTER(H5Tfind, NULL);
/* Check args */
- if (H5_DATATYPE != H5A_group(src_id) ||
- NULL == (src = H5A_object(src_id)) ||
- H5_DATATYPE != H5A_group(dst_id) ||
- NULL == (dst = H5A_object(dst_id))) {
+ if (H5_DATATYPE != H5I_group(src_id) ||
+ NULL == (src = H5I_object(src_id)) ||
+ H5_DATATYPE != H5I_group(dst_id) ||
+ NULL == (dst = H5I_object(dst_id))) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type");
}
if (!pcdata) {
@@ -3150,8 +3150,8 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, hbool_t create,
path->func = func;
path->is_hard = TRUE;
path->cdata.command = H5T_CONV_INIT;
- if ((src_id=H5A_register(H5_DATATYPE, H5T_copy(path->src))) < 0 ||
- (dst_id=H5A_register(H5_DATATYPE, H5T_copy(path->dst))) < 0) {
+ if ((src_id=H5I_register(H5_DATATYPE, H5T_copy(path->src))) < 0 ||
+ (dst_id=H5I_register(H5_DATATYPE, H5T_copy(path->dst))) < 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
"unable to register conv types for query");
}
@@ -3162,8 +3162,8 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, hbool_t create,
#endif
H5E_clear(); /*ignore the failure*/
}
- H5A_dec_ref(src_id);
- H5A_dec_ref(dst_id);
+ H5I_dec_ref(src_id);
+ H5I_dec_ref(dst_id);
} else {
/* Locate a soft function */
for (i=H5T_nsoft_g-1; i>=0 && !path->func; --i) {
@@ -3171,9 +3171,9 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, hbool_t create,
dst->type!=H5T_soft_g[i].dst) {
continue;
}
- if ((src_id=H5A_register(H5_DATATYPE,
+ if ((src_id=H5I_register(H5_DATATYPE,
H5T_copy(path->src))) < 0 ||
- (dst_id=H5A_register(H5_DATATYPE,
+ (dst_id=H5I_register(H5_DATATYPE,
H5T_copy(path->dst))) < 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
"unable to register conv types for query");
@@ -3186,8 +3186,8 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, hbool_t create,
} else {
path->func = H5T_soft_g[i].func;
}
- H5A_dec_ref(src_id);
- H5A_dec_ref(dst_id);
+ H5I_dec_ref(src_id);
+ H5I_dec_ref(dst_id);
}
}
}