summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/h5tools_utils.c')
-rw-r--r--tools/lib/h5tools_utils.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index 9eba7c5..c1fa292 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -488,15 +488,18 @@ find_objs_cb(hid_t group, const char *name, void *op_data)
if(H5Gget_objinfo(group, name, FALSE, &statbuf) < 0)
ret_value = FAIL;
else {
+ haddr_t objno; /* Compact form of object's location */
+
+ objno = (haddr_t)statbuf.objno[0] | ((haddr_t)statbuf.objno[1] << (8 * sizeof(long)));
switch (statbuf.type) {
char *tmp;
case H5G_GROUP:
- if (search_obj(info->group_table, statbuf.u.obj.objno) == NULL) {
+ if (search_obj(info->group_table, objno) == NULL) {
char *old_prefix;
tmp = build_obj_path_name(info->prefix, name);
- add_obj(info->group_table, statbuf.u.obj.objno, tmp, TRUE);
+ add_obj(info->group_table, objno, tmp, TRUE);
old_prefix = info->prefix;
info->prefix = tmp;
@@ -509,11 +512,11 @@ find_objs_cb(hid_t group, const char *name, void *op_data)
break;
case H5G_DATASET:
- if (search_obj(info->dset_table, statbuf.u.obj.objno) == NULL) {
+ if (search_obj(info->dset_table, objno) == NULL) {
hid_t dset;
tmp = build_obj_path_name(info->prefix, name);
- add_obj(info->dset_table, statbuf.u.obj.objno, tmp, TRUE);
+ add_obj(info->dset_table, objno, tmp, TRUE);
if ((dset = H5Dopen (group, name)) >= 0) {
hid_t type;
@@ -522,11 +525,12 @@ find_objs_cb(hid_t group, const char *name, void *op_data)
if (H5Tcommitted(type) > 0) {
H5Gget_objinfo(type, ".", TRUE, &statbuf);
+ objno = (haddr_t)statbuf.objno[0] | ((haddr_t)statbuf.objno[1] << (8 * sizeof(long)));
- if (search_obj(info->type_table, statbuf.u.obj.objno) == NULL) {
+ if (search_obj(info->type_table, objno) == NULL) {
char *type_name = HDstrdup(tmp);
- add_obj(info->type_table, statbuf.u.obj.objno, type_name, FALSE);
+ add_obj(info->type_table, objno, type_name, FALSE);
} /* end if */
}
@@ -543,8 +547,8 @@ find_objs_cb(hid_t group, const char *name, void *op_data)
obj_t *found_obj;
tmp = build_obj_path_name(info->prefix, name);
- if ((found_obj = search_obj(info->type_table, statbuf.u.obj.objno)) == NULL)
- add_obj(info->type_table, statbuf.u.obj.objno, tmp, TRUE);
+ if ((found_obj = search_obj(info->type_table, objno)) == NULL)
+ add_obj(info->type_table, objno, tmp, TRUE);
else {
/* Use latest version of name */
HDfree(found_obj->objname);