summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST1
-rw-r--r--c++/src/H5Location.cpp6
-rw-r--r--c++/src/H5Object.cpp4
-rw-r--r--fortran/src/H5Af.c3
-rw-r--r--fortran/src/H5Gf.c3
-rw-r--r--fortran/src/H5Of.c21
-rw-r--r--hl/src/H5DS.c28
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/H5Gdeprec.c2
-rw-r--r--src/H5Gloc.c8
-rw-r--r--src/H5Gnode.c3
-rw-r--r--src/H5Gprivate.h2
-rw-r--r--src/H5O.c143
-rw-r--r--src/H5Odeprec.c332
-rw-r--r--src/H5Oint.c153
-rw-r--r--src/H5Opkg.h6
-rw-r--r--src/H5Oprivate.h3
-rw-r--r--src/H5Opublic.h42
-rw-r--r--src/H5vers.txt5
-rw-r--r--src/Makefile.am2
-rw-r--r--test/cache_tagging.c8
-rw-r--r--test/cork.c40
-rw-r--r--test/dsets.c14
-rw-r--r--test/dtypes.c8
-rw-r--r--test/flushrefresh.c8
-rw-r--r--test/genall5.c6
-rw-r--r--test/getname.c2
-rw-r--r--test/h5test.c4
-rw-r--r--test/links.c114
-rw-r--r--test/mount.c64
-rw-r--r--test/mtime.c8
-rw-r--r--test/objcopy.c166
-rw-r--r--test/ohdr.c2
-rw-r--r--test/stab.c4
-rw-r--r--test/tattr.c50
-rw-r--r--test/tfile.c16
-rw-r--r--test/th5o.c380
-rw-r--r--test/titerate.c10
-rw-r--r--test/tmisc.c24
-rw-r--r--test/trefer.c2
-rw-r--r--test/tsohm.c4
-rw-r--r--test/unlink.c12
-rw-r--r--test/vds.c2
-rw-r--r--tools/lib/h5diff.c12
-rw-r--r--tools/lib/h5diff_array.c4
-rw-r--r--tools/lib/h5diff_attr.c4
-rw-r--r--tools/lib/h5tools.c8
-rw-r--r--tools/lib/h5tools_dump.c2
-rw-r--r--tools/lib/h5tools_ref.c4
-rw-r--r--tools/lib/h5tools_str.c2
-rw-r--r--tools/lib/h5tools_utils.c6
-rw-r--r--tools/lib/h5trav.c22
-rw-r--r--tools/lib/h5trav.h2
-rw-r--r--tools/src/h5dump/h5dump.c3
-rw-r--r--tools/src/h5dump/h5dump_ddl.c12
-rw-r--r--tools/src/h5dump/h5dump_xml.c10
-rw-r--r--tools/src/h5format_convert/h5format_convert.c2
-rw-r--r--tools/src/h5ls/h5ls.c6
-rw-r--r--tools/src/h5repack/h5repack.c4
-rw-r--r--tools/src/h5repack/h5repack_refs.c4
-rw-r--r--tools/src/h5stat/h5stat.c4
61 files changed, 1284 insertions, 543 deletions
diff --git a/MANIFEST b/MANIFEST
index 01edd91..fdc5124 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -751,6 +751,7 @@
./src/H5Ocont.c
./src/H5Ocopy.c
./src/H5Odbg.c
+./src/H5Odeprec.c
./src/H5Odrvinfo.c
./src/H5Odtype.c
./src/H5Oefl.c
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index 2dceb6e..5e01a74 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -1827,7 +1827,7 @@ H5O_type_t H5Location::childObjType(const char* objname) const
H5O_type_t objtype = H5O_TYPE_UNKNOWN;
// Use C API to get information of the object
- herr_t ret_value = H5Oget_info_by_name(getId(), objname, &objinfo, H5P_DEFAULT);
+ herr_t ret_value = H5Oget_info_by_name2(getId(), objname, &objinfo, 0, H5P_DEFAULT);
// Throw exception if C API returns failure
if (ret_value < 0)
@@ -1902,7 +1902,7 @@ H5O_type_t H5Location::childObjType(hsize_t index, H5_index_t index_type, H5_ite
H5O_type_t objtype = H5O_TYPE_UNKNOWN;
// Use C API to get information of the object
- ret_value = H5Oget_info_by_idx(getId(), objname, index_type, order, index, &objinfo, H5P_DEFAULT);
+ ret_value = H5Oget_info_by_idx2(getId(), objname, index_type, order, index, &objinfo, 0, H5P_DEFAULT);
// Throw exception if C API returns failure
if (ret_value < 0)
@@ -1944,7 +1944,7 @@ unsigned H5Location::childObjVersion(const char* objname) const
unsigned version = 0;
// Use C API to get information of the object
- herr_t ret_value = H5Oget_info_by_name(getId(), objname, &objinfo, H5P_DEFAULT);
+ herr_t ret_value = H5Oget_info_by_name2(getId(), objname, &objinfo, H5O_INFO_HDR, H5P_DEFAULT);
// Throw exception if C API returns failure
if (ret_value < 0)
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index 5d102d7..b95e222 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -244,7 +244,7 @@ unsigned H5Object::objVersion() const
unsigned version = 0;
// Use C API to get information of the object
- herr_t ret_value = H5Oget_info(getId(), &objinfo);
+ herr_t ret_value = H5Oget_info2(getId(), &objinfo, H5O_INFO_HDR);
// Throw exception if C API returns failure
if (ret_value < 0)
@@ -270,7 +270,7 @@ int H5Object::getNumAttrs() const
{
H5O_info_t oinfo; /* Object info */
- if(H5Oget_info(getId(), &oinfo) < 0)
+ if(H5Oget_info2(getId(), &oinfo, H5O_INFO_NUM_ATTRS) < 0)
throw AttributeIException(inMemFunc("getNumAttrs"), "H5Oget_info failed");
else
return(static_cast<int>(oinfo.num_attrs));
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c
index 23dd936..c75f19e 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -143,7 +143,8 @@ h5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num)
/*
* Call H5Oget_info function.
*/
- if(H5Oget_info((hid_t)*obj_id, &oinfo) < 0)
+ /* TO DO: See H5Opublic.h: #define H5O_INFO_NUM_ATTRS 0x0002u Fill in the num_attrs field */
+ if(H5Oget_info2((hid_t)*obj_id, &oinfo, (unsigned)2) < 0)
HGOTO_DONE(FAIL);
/* Set number of attributes */
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c
index b829b20..4ce7970 100644
--- a/fortran/src/H5Gf.c
+++ b/fortran/src/H5Gf.c
@@ -200,7 +200,8 @@ h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx,
/* Query the object's information */
if(H5Lget_name_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, c_obj_name, c_obj_namelen, H5P_DEFAULT) < 0)
goto DONE;
- if(H5Oget_info_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, &oinfo, H5P_DEFAULT) < 0)
+ /* TO DO: See flags for H5Oget_info in H5Opublic.h */
+ if(H5Oget_info_by_idx2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, &oinfo, 0, H5P_DEFAULT) < 0)
goto DONE;
/* XXX: Switch from using H5Gget_objtype_by_idx() means that this routine won't
diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c
index 7d065a5..63d0084 100644
--- a/fortran/src/H5Of.c
+++ b/fortran/src/H5Of.c
@@ -250,7 +250,8 @@ h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op,
/*
* Call H5Ovisit
*/
- func_ret_value = H5Ovisit( (hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, op, op_data);
+ /* TO DO: See H5Opublic.h: #define H5O_INFO_ALL (H5O_INFO_TIME|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR|H5O_INFO_META_SIZE) */
+ func_ret_value = H5Ovisit( (hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, op, op_data, (unsigned)15);
ret_value = (int_f)func_ret_value;
@@ -330,8 +331,9 @@ h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *l
/*
* Call H5Oinfo_by_name function.
*/
- if(H5Oget_info_by_name((hid_t)*loc_id, c_name,
- &Oinfo, (hid_t)*lapl_id) < 0)
+ /* TO DO: See H5Opublic.h: #define H5O_INFO_ALL (H5O_INFO_TIME|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR|H5O_INFO_META_SIZE) */
+ if(H5Oget_info_by_name2((hid_t)*loc_id, c_name,
+ &Oinfo, (unsigned)15, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
ret_value = fill_h5o_info_t_f(Oinfo,object_info);
@@ -385,8 +387,9 @@ h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen,
/*
* Call H5Oinfo_by_idx function.
*/
- if(H5Oget_info_by_idx((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n,
- &Oinfo, (hid_t)*lapl_id) < 0)
+ /* TO DO: See H5Opublic.h: #define H5O_INFO_ALL (H5O_INFO_TIME|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR|H5O_INFO_META_SIZE) */
+ if(H5Oget_info_by_idx2((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n,
+ &Oinfo, (unsigned)15, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
ret_value = fill_h5o_info_t_f(Oinfo,object_info);
@@ -424,7 +427,8 @@ h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info)
/*
* Call H5Oinfo_by_name function.
*/
- if(H5Oget_info((hid_t)*object_id, &Oinfo) < 0)
+ /* TO DO: See H5Opublic.h: #define H5O_INFO_ALL (H5O_INFO_TIME|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR|H5O_INFO_META_SIZE) */
+ if(H5Oget_info2((hid_t)*object_id, &Oinfo, (unsigned)15) < 0)
HGOTO_DONE(FAIL);
ret_value = fill_h5o_info_t_f(Oinfo,object_info);
@@ -532,8 +536,9 @@ h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f
/*
* Call H5Ovisit
*/
- func_ret_value = H5Ovisit_by_name( (hid_t)*loc_id, c_object_name, (H5_index_t)*index_type, (H5_iter_order_t)*order,
- op, op_data, (hid_t)*lapl_id);
+ /* TO DO: See H5Opublic.h: #define H5O_INFO_ALL (H5O_INFO_TIME|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR|H5O_INFO_META_SIZE) */
+ func_ret_value = H5Ovisit_by_name2( (hid_t)*loc_id, c_object_name, (H5_index_t)*index_type, (H5_iter_order_t)*order,
+ op, op_data, (unsigned)15, (hid_t)*lapl_id);
ret_value = (int_f)func_ret_value;
done:
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c
index 527c92b..78fb59d 100644
--- a/hl/src/H5DS.c
+++ b/hl/src/H5DS.c
@@ -160,11 +160,11 @@ herr_t H5DSattach_scale(hid_t did,
return FAIL;
/* get info for the dataset in the parameter list */
- if(H5Oget_info(did, &oi1) < 0)
+ if(H5Oget_info2(did, &oi1, 0) < 0)
return FAIL;
/* get info for the scale in the parameter list */
- if(H5Oget_info(dsid, &oi2) < 0)
+ if(H5Oget_info2(dsid, &oi2, 0) < 0)
return FAIL;
/* same object, not valid */
@@ -324,11 +324,11 @@ herr_t H5DSattach_scale(hid_t did,
goto out;
/* get info for DS in the parameter list */
- if(H5Oget_info(dsid, &oi1) < 0)
+ if(H5Oget_info2(dsid, &oi1, 0) < 0)
goto out;
/* get info for this DS */
- if(H5Oget_info(dsid_j, &oi2) < 0)
+ if(H5Oget_info2(dsid_j, &oi2, 0) < 0)
goto out;
/* same object, so this DS scale is already in this DIM IDX */
@@ -609,11 +609,11 @@ herr_t H5DSdetach_scale(hid_t did,
return FAIL;
/* get info for the dataset in the parameter list */
- if(H5Oget_info(did, &did_oi) < 0)
+ if(H5Oget_info2(did, &did_oi, 0) < 0)
return FAIL;
/* get info for the scale in the parameter list */
- if(H5Oget_info(dsid, &dsid_oi) < 0)
+ if(H5Oget_info2(dsid, &dsid_oi, 0) < 0)
return FAIL;
/* same object, not valid */
@@ -696,7 +696,7 @@ herr_t H5DSdetach_scale(hid_t did,
goto out;
/* get info for this DS */
- if(H5Oget_info(dsid_j, &tmp_oi) < 0)
+ if(H5Oget_info2(dsid_j, &tmp_oi, 0) < 0)
goto out;
/* Close the dereferenced dataset */
@@ -806,7 +806,7 @@ herr_t H5DSdetach_scale(hid_t did,
goto out;
/* get info for this dataset */
- if(H5Oget_info(did_i, &tmp_oi) < 0)
+ if(H5Oget_info2(did_i, &tmp_oi, 0) < 0)
goto out;
/* close the dereferenced dataset */
@@ -973,11 +973,11 @@ htri_t H5DSis_attached(hid_t did,
return FAIL;
/* get info for the dataset in the parameter list */
- if(H5Oget_info(did, &oi1) < 0)
+ if(H5Oget_info2(did, &oi1, 0) < 0)
return FAIL;
/* get info for the scale in the parameter list */
- if(H5Oget_info(dsid, &oi2) < 0)
+ if(H5Oget_info2(dsid, &oi2, 0) < 0)
return FAIL;
/* same object, not valid */
@@ -1054,11 +1054,11 @@ htri_t H5DSis_attached(hid_t did,
goto out;
/* get info for DS in the parameter list */
- if(H5Oget_info(dsid, &oi1) < 0)
+ if(H5Oget_info2(dsid, &oi1, 0) < 0)
goto out;
/* get info for this DS */
- if(H5Oget_info(dsid_j, &oi2) < 0)
+ if(H5Oget_info2(dsid_j, &oi2, 0) < 0)
goto out;
/* same object */
@@ -1144,11 +1144,11 @@ htri_t H5DSis_attached(hid_t did,
goto out;
/* get info for dataset in the parameter list */
- if(H5Oget_info(did, &oi3) < 0)
+ if(H5Oget_info2(did, &oi3, 0) < 0)
goto out;
/* get info for this dataset */
- if(H5Oget_info(did_i, &oi4) < 0)
+ if(H5Oget_info2(did_i, &oi4, 0) < 0)
goto out;
/* same object */
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 435fe9a..c236b21 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -455,6 +455,7 @@ set (H5O_SOURCES
${HDF5_SRC_DIR}/H5Ocont.c
${HDF5_SRC_DIR}/H5Ocopy.c
${HDF5_SRC_DIR}/H5Odbg.c
+ ${HDF5_SRC_DIR}/H5Odeprec.c
${HDF5_SRC_DIR}/H5Odrvinfo.c
${HDF5_SRC_DIR}/H5Odtype.c
${HDF5_SRC_DIR}/H5Oefl.c
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index fc346f8..bd1b0ec 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -1118,7 +1118,7 @@ H5G__get_objinfo_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char *name, c
/* Go retrieve the object information */
/* (don't need index & heap info) */
HDassert(obj_loc);
- if(H5O_get_info(obj_loc->oloc, FALSE, &oinfo) < 0)
+ if(H5O_get_info(obj_loc->oloc, &oinfo, H5O_INFO_TIME | H5O_INFO_HDR) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get object info")
/* Get mapped object type */
diff --git a/src/H5Gloc.c b/src/H5Gloc.c
index 7273a89..f5a14a1 100644
--- a/src/H5Gloc.c
+++ b/src/H5Gloc.c
@@ -76,7 +76,7 @@ typedef struct {
/* User data for getting an object's info in a group */
typedef struct {
/* downward */
- hbool_t want_ih_info; /* Whether to retrieve the index & heap info */
+ unsigned fields; /* which fields in H5O_info_t struct to fill in */
/* upward */
H5O_info_t *oinfo; /* Object information to retrieve */
@@ -684,7 +684,7 @@ H5G_loc_info_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUS
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
/* Query object information */
- if(H5O_get_info(obj_loc->oloc, udata->want_ih_info, udata->oinfo) < 0)
+ if(H5O_get_info(obj_loc->oloc, udata->oinfo, udata->fields) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object info")
done:
@@ -710,7 +710,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_loc_info(const H5G_loc_t *loc, const char *name, hbool_t want_ih_info, H5O_info_t *oinfo/*out*/)
+H5G_loc_info(const H5G_loc_t *loc, const char *name, H5O_info_t *oinfo/*out*/, unsigned fields)
{
H5G_loc_info_t udata; /* User data for traversal callback */
herr_t ret_value = SUCCEED; /* Return value */
@@ -723,7 +723,7 @@ H5G_loc_info(const H5G_loc_t *loc, const char *name, hbool_t want_ih_info, H5O_i
HDassert(oinfo);
/* Set up user data for locating object */
- udata.want_ih_info = want_ih_info;
+ udata.fields = fields;
udata.oinfo = oinfo;
/* Traverse group hierarchy to locate object */
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 2ae3d538..bf77833 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -1274,7 +1274,8 @@ H5G__node_copy(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get link name")
/* Check if the object pointed by the soft link exists in the source file */
- if(H5G_loc_info(&grp_loc, link_name, FALSE, &oinfo) >= 0) {
+ /* Only basic information is needed therefore pass in "0" for field selection */
+ if(H5G_loc_info(&grp_loc, link_name, &oinfo, 0) >= 0) {
tmp_src_ent.header = oinfo.addr;
src_ent = &tmp_src_ent;
} /* end if */
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index 427f14b..95dfef5 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -277,7 +277,7 @@ H5_DLL herr_t H5G_loc_find_by_idx(const H5G_loc_t *loc, const char *group_name,
H5G_loc_t *obj_loc/*out*/);
H5_DLL htri_t H5G_loc_exists(const H5G_loc_t *loc, const char *name);
H5_DLL herr_t H5G_loc_info(const H5G_loc_t *loc, const char *name,
- hbool_t want_ih_info, H5O_info_t *oinfo/*out*/);
+ H5O_info_t *oinfo/*out*/, unsigned fields);
H5_DLL herr_t H5G_loc_set_comment(const H5G_loc_t *loc, const char *name,
const char *comment);
H5_DLL ssize_t H5G_loc_get_comment(const H5G_loc_t *loc, const char *name,
diff --git a/src/H5O.c b/src/H5O.c
index f700ac9..c5db814 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -435,63 +435,70 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Oget_info
+ * Function: H5Oget_info2
*
- * Purpose: Retrieve information about an object.
+ * Purpose: Retrieve information about an object.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * NOTE: Add a parameter "fields" to indicate selection of object info.
*
- * Programmer: Quincey Koziol
- * November 21 2006
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Neil Fortner
+ * July 7 2010
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Oget_info(hid_t loc_id, H5O_info_t *oinfo)
+H5Oget_info2(hid_t loc_id, H5O_info_t *oinfo, unsigned fields)
{
- H5G_loc_t loc; /* Location of group */
+ H5G_loc_t loc; /* Location of group */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE2("e", "i*x", loc_id, oinfo);
+ H5TRACE3("e", "i*xIu", loc_id, oinfo, fields);
/* Check args */
if(H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(!oinfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
+ if(fields & ~H5O_INFO_ALL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields")
/* Retrieve the object's information */
- if(H5O__get_info_by_name(&loc, ".", oinfo/*out*/) < 0)
+ if(H5O__get_info_by_name(&loc, ".", oinfo/*out*/, fields) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Oget_info() */
+} /* end H5Oget_info2() */
-/*-------------------------------------------------------------------------
- * Function: H5Oget_info_by_name
- *
- * Purpose: Retrieve information about an object.
- *
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * November 21 2006
- *
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * Function: H5Oget_info_by_name2
+ *
+ * Purpose: Retrieve information about an object.
+ *
+ * NOTE: Add a parameter "fields" to indicate selection of object info.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Neil Fortner
+ * July 7 2010
+ *
+ *-------------------------------------------------------------------------
+ */
herr_t
-H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lapl_id)
+H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info_t *oinfo,
+ unsigned fields, hid_t lapl_id)
{
H5G_loc_t loc; /* Location of group */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE4("e", "i*s*xi", loc_id, name, oinfo, lapl_id);
+ H5TRACE5("e", "i*s*xIui", loc_id, name, oinfo, fields, lapl_id);
/* Check args */
if(H5G_loc(loc_id, &loc) < 0)
@@ -500,44 +507,48 @@ H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lap
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
if(!oinfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
+ if(fields & ~H5O_INFO_ALL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields")
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info")
/* Retrieve the object's information */
- if(H5O__get_info_by_name(&loc, name, oinfo/*out*/) < 0)
+ if(H5O__get_info_by_name(&loc, name, oinfo/*out*/, fields) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object: '%s'", name)
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Oget_info_by_name() */
+} /* end H5Oget_info_by_name2() */
/*-------------------------------------------------------------------------
- * Function: H5Oget_info_by_idx
+ * Function: H5Oget_info_by_idx2
*
- * Purpose: Retrieve information about an object, according to the order
+ * Purpose: Retrieve information about an object, according to the order
* of an index.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * NOTE: Add a parameter "fields" to indicate selection of object info.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
- * November 26 2006
+ * November 26 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, hid_t lapl_id)
+H5Oget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, unsigned fields, hid_t lapl_id)
{
H5G_loc_t loc; /* Location of group */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE7("e", "i*sIiIoh*xi", loc_id, group_name, idx_type, order, n, oinfo,
- lapl_id);
+ H5TRACE8("e", "i*sIiIoh*xIui", loc_id, group_name, idx_type, order, n, oinfo,
+ fields, lapl_id);
/* Check args */
if(H5G_loc(loc_id, &loc) < 0)
@@ -550,18 +561,20 @@ H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
if(!oinfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
+ if(fields & ~H5O_INFO_ALL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields")
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info")
/* Retrieve the object's information */
- if(H5O__get_info_by_idx(&loc, group_name, idx_type, order, n, oinfo) < 0)
+ if(H5O__get_info_by_idx(&loc, group_name, idx_type, order, n, oinfo, fields) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Oget_info_by_idx() */
+} /* end H5Oget_info_by_idx2() */
/*-------------------------------------------------------------------------
@@ -737,9 +750,9 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Ovisit
+ * Function: H5Ovisit2
*
- * Purpose: Recursively visit an object and all the objects reachable
+ * Purpose: Recursively visit an object and all the objects reachable
* from it. If the starting object is a group, all the objects
* linked to from that group will be visited. Links within
* each group are visited according to the order within the
@@ -755,27 +768,30 @@ done:
* iteration index and iteration order given) will be used to in
* the callback about the object.
*
- * Return: Success: The return value of the first operator that
+ * NOTE: Add a a parameter "fields" to indicate selection of
+ * object info to be retrieved to the callback "op".
+ *
+ * Return: Success: The return value of the first operator that
* returns non-zero, or zero if all members were
* processed with no operator returning non-zero.
*
- * Failure: Negative if something goes wrong within the
+ * Failure: Negative if something goes wrong within the
* library, or the negative value returned by one
* of the operators.
*
* Programmer: Quincey Koziol
- * November 25 2007
+ * November 25 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Ovisit(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
- H5O_iterate_t op, void *op_data)
+H5Ovisit2(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
+ H5O_iterate_t op, void *op_data, unsigned fields)
{
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE5("e", "iIiIox*x", obj_id, idx_type, order, op, op_data);
+ H5TRACE6("e", "iIiIox*xIu", obj_id, idx_type, order, op, op_data, fields);
/* Check args */
if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
@@ -784,20 +800,22 @@ H5Ovisit(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
if(!op)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified")
+ if(fields & ~H5O_INFO_ALL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields")
/* Call internal object visitation routine */
- if((ret_value = H5O__visit(obj_id, ".", idx_type, order, op, op_data)) < 0)
+ if((ret_value = H5O__visit(obj_id, ".", idx_type, order, op, op_data, fields)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed")
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Ovisit() */
+} /* end H5Ovisit2() */
/*-------------------------------------------------------------------------
- * Function: H5Ovisit_by_name
+ * Function: H5Ovisit_by_name2
*
- * Purpose: Recursively visit an object and all the objects reachable
+ * Purpose: Recursively visit an object and all the objects reachable
* from it. If the starting object is a group, all the objects
* linked to from that group will be visited. Links within
* each group are visited according to the order within the
@@ -813,28 +831,31 @@ done:
* iteration index and iteration order given) will be used to in
* the callback about the object.
*
- * Return: Success: The return value of the first operator that
+ * NOTE: Add a a parameter "fields" to indicate selection of
+ * object info to be retrieved to the callback "op".
+ *
+ * Return: Success: The return value of the first operator that
* returns non-zero, or zero if all members were
* processed with no operator returning non-zero.
*
- * Failure: Negative if something goes wrong within the
+ * Failure: Negative if something goes wrong within the
* library, or the negative value returned by one
* of the operators.
*
* Programmer: Quincey Koziol
- * November 24 2007
+ * November 24 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Ovisit_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
- H5_iter_order_t order, H5O_iterate_t op, void *op_data, hid_t lapl_id)
+H5Ovisit_by_name2(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
+ H5_iter_order_t order, H5O_iterate_t op, void *op_data, unsigned fields, hid_t lapl_id)
{
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE7("e", "i*sIiIox*xi", loc_id, obj_name, idx_type, order, op, op_data,
- lapl_id);
+ H5TRACE8("e", "i*sIiIox*xIui", loc_id, obj_name, idx_type, order, op, op_data,
+ fields, lapl_id);
/* Check args */
if(!obj_name || !*obj_name)
@@ -845,18 +866,20 @@ H5Ovisit_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
if(!op)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified")
+ if(fields & ~H5O_INFO_ALL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields")
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info")
/* Call internal object visitation routine */
- if((ret_value = H5O__visit(loc_id, obj_name, idx_type, order, op, op_data)) < 0)
+ if((ret_value = H5O__visit(loc_id, obj_name, idx_type, order, op, op_data, fields)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed")
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Ovisit_by_name() */
+} /* end H5Ovisit_by_name2() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Odeprec.c b/src/H5Odeprec.c
new file mode 100644
index 0000000..876579d
--- /dev/null
+++ b/src/H5Odeprec.c
@@ -0,0 +1,332 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*-------------------------------------------------------------------------
+ *
+ * Purpose: Deprecated functions from the H5O interface. These
+ * functions are here for compatibility purposes and may be
+ * removed in the future. Applications should switch to the
+ * newer APIs.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/****************/
+/* Module Setup */
+/****************/
+
+#include "H5Omodule.h" /* This source code file is part of the H5O module */
+
+
+/***********/
+/* Headers */
+/***********/
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Opkg.h" /* Object headers */
+
+
+/****************/
+/* Local Macros */
+/****************/
+
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+
+/********************/
+/* Package Typedefs */
+/********************/
+
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Oget_info1
+ *
+ * Purpose: Retrieve information about an object.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Oget_info1(hid_t loc_id, H5O_info_t *oinfo)
+{
+ H5G_loc_t loc; /* Location of group */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "i*x", loc_id, oinfo);
+
+ /* Check args */
+ if(H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if(!oinfo)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
+
+ /* Retrieve the object's information */
+ if(H5O__get_info_by_name(&loc, ".", oinfo/*out*/, H5O_INFO_ALL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Oget_info1() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Oget_info_by_name1
+ *
+ * Purpose: Retrieve information about an object.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Oget_info_by_name1(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lapl_id)
+{
+ H5G_loc_t loc; /* Location of group */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE4("e", "i*s*xi", loc_id, name, oinfo, lapl_id);
+
+ /* Check args */
+ if(H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if(!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ if(!oinfo)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
+
+ /* Verify access property list and set up collective metadata if appropriate */
+ if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info")
+
+ /* Retrieve the object's information */
+ if(H5O__get_info_by_name(&loc, name, oinfo/*out*/, H5O_INFO_ALL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object: '%s'", name)
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Oget_info_by_name1() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Oget_info_by_idx1
+ *
+ * Purpose: Retrieve information about an object, according to the order
+ * of an index.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Quincey Koziol
+ * November 26 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Oget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, hid_t lapl_id)
+{
+ H5G_loc_t loc; /* Location of group */
+ H5G_loc_t obj_loc; /* Location used to open group */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Entry at 'name' found */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE7("e", "i*sIiIoh*xi", loc_id, group_name, idx_type, order, n, oinfo,
+ lapl_id);
+
+ /* Check args */
+ if(H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if(!group_name || !*group_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
+ if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ if(!oinfo)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
+
+ /* Verify access property list and set up collective metadata if appropriate */
+ if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info")
+
+ /* Retrieve the object's information */
+ if(H5O__get_info_by_idx(&loc, group_name, idx_type, order, n, oinfo, H5O_INFO_ALL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
+
+done:
+ /* Release the object location */
+ if(loc_found && H5G_loc_free(&obj_loc) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't free location")
+
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Oget_info_by_idx1() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Ovisit1
+ *
+ * Purpose: Recursively visit an object and all the objects reachable
+ * from it. If the starting object is a group, all the objects
+ * linked to from that group will be visited. Links within
+ * each group are visited according to the order within the
+ * specified index (unless the specified index does not exist for
+ * a particular group, then the "name" index is used).
+ *
+ * NOTE: Soft links and user-defined links are ignored during
+ * this operation.
+ *
+ * NOTE: Each _object_ reachable from the initial group will only
+ * be visited once. If multiple hard links point to the same
+ * object, the first link to the object's path (according to the
+ * iteration index and iteration order given) will be used to in
+ * the callback about the object.
+ *
+ * Return: Success: The return value of the first operator that
+ * returns non-zero, or zero if all members were
+ * processed with no operator returning non-zero.
+ *
+ * Failure: Negative if something goes wrong within the
+ * library, or the negative value returned by one
+ * of the operators.
+ *
+ * Programmer: Quincey Koziol
+ * November 25 2007
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Ovisit1(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
+ H5O_iterate_t op, void *op_data)
+{
+ herr_t ret_value; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE5("e", "iIiIox*x", obj_id, idx_type, order, op, op_data);
+
+ /* Check args */
+ if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ if(!op)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified")
+
+ /* Call internal object visitation routine */
+ if((ret_value = H5O__visit(obj_id, ".", idx_type, order, op, op_data, H5O_INFO_ALL)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Ovisit1() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Ovisit_by_name1
+ *
+ * Purpose: Recursively visit an object and all the objects reachable
+ * from it. If the starting object is a group, all the objects
+ * linked to from that group will be visited. Links within
+ * each group are visited according to the order within the
+ * specified index (unless the specified index does not exist for
+ * a particular group, then the "name" index is used).
+ *
+ * NOTE: Soft links and user-defined links are ignored during
+ * this operation.
+ *
+ * NOTE: Each _object_ reachable from the initial group will only
+ * be visited once. If multiple hard links point to the same
+ * object, the first link to the object's path (according to the
+ * iteration index and iteration order given) will be used to in
+ * the callback about the object.
+ *
+ * Return: Success: The return value of the first operator that
+ * returns non-zero, or zero if all members were
+ * processed with no operator returning non-zero.
+ *
+ * Failure: Negative if something goes wrong within the
+ * library, or the negative value returned by one
+ * of the operators.
+ *
+ * Programmer: Quincey Koziol
+ * November 24 2007
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Ovisit_by_name1(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
+ H5_iter_order_t order, H5O_iterate_t op, void *op_data, hid_t lapl_id)
+{
+ herr_t ret_value; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE7("e", "i*sIiIox*xi", loc_id, obj_name, idx_type, order, op, op_data,
+ lapl_id);
+
+ /* Check args */
+ if(!obj_name || !*obj_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ if(!op)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified")
+
+ /* Verify access property list and set up collective metadata if appropriate */
+ if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info")
+
+ /* Call internal object visitation routine */
+ if((ret_value = H5O__visit(loc_id, obj_name, idx_type, order, op, op_data, H5O_INFO_ALL)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Ovisit_by_name1() */
+
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
diff --git a/src/H5Oint.c b/src/H5Oint.c
index c9e82c0..7c5977f 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -61,6 +61,7 @@ typedef struct {
H5SL_t *visited; /* Skip list for tracking visited nodes */
H5O_iterate_t op; /* Application callback */
void *op_data; /* Application's op data */
+ unsigned fields; /* Selection of object info */
} H5O_iter_visit_ud_t;
@@ -2211,20 +2212,22 @@ H5O__get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr)
/*-------------------------------------------------------------------------
- * Function: H5O_get_info
+ * Function: H5O_get_info
*
- * Purpose: Retrieve the information for an object
+ * Purpose: Retrieve the information for an object
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Note: Add a parameter "fields" to indicate selection of object info.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * November 21 2006
+ * Programmer: Quincey Koziol
+ * November 21 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O_get_info(const H5O_loc_t *loc, hbool_t want_ih_info, H5O_info_t *oinfo)
+H5O_get_info(const H5O_loc_t *loc, H5O_info_t *oinfo, unsigned fields)
{
const H5O_obj_class_t *obj_class; /* Class of object for header */
H5O_t *oh = NULL; /* Object header */
@@ -2259,57 +2262,61 @@ H5O_get_info(const H5O_loc_t *loc, hbool_t want_ih_info, H5O_info_t *oinfo)
/* Set the object's reference count */
oinfo->rc = oh->nlink;
- /* Get modification time for object */
- if(oh->version > H5O_VERSION_1) {
- oinfo->atime = oh->atime;
- oinfo->mtime = oh->mtime;
- oinfo->ctime = oh->ctime;
- oinfo->btime = oh->btime;
- } /* end if */
- else {
- htri_t exists; /* Flag if header message of interest exists */
-
- /* No information for access & modification fields */
- /* (we stopped updating the "modification time" header message for
- * raw data changes, so the "modification time" header message
- * is closest to the 'change time', in POSIX terms - QAK)
- */
- oinfo->atime = 0;
- oinfo->mtime = 0;
- oinfo->btime = 0;
-
- /* Might be information for modification time */
- if((exists = H5O_msg_exists_oh(oh, H5O_MTIME_ID)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for MTIME message")
- if(exists > 0) {
- /* Get "old style" modification time info */
- if(NULL == H5O_msg_read_oh(loc->file, oh, H5O_MTIME_ID, &oinfo->ctime))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read MTIME message")
+ /* Get time information, if requested */
+ if(fields & H5O_INFO_TIME) {
+ if(oh->version > H5O_VERSION_1) {
+ oinfo->atime = oh->atime;
+ oinfo->mtime = oh->mtime;
+ oinfo->ctime = oh->ctime;
+ oinfo->btime = oh->btime;
} /* end if */
else {
- /* Check for "new style" modification time info */
- if((exists = H5O_msg_exists_oh(oh, H5O_MTIME_NEW_ID)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for MTIME_NEW message")
- if(exists > 0) {
- /* Get "new style" modification time info */
- if(NULL == H5O_msg_read_oh(loc->file, oh, H5O_MTIME_NEW_ID, &oinfo->ctime))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read MTIME_NEW message")
+ htri_t exists; /* Flag if header message of interest exists */
+
+ /* No information for access & modification fields */
+ /* (we stopped updating the "modification time" header message for
+ * raw data changes, so the "modification time" header message
+ * is closest to the 'change time', in POSIX terms - QAK)
+ */
+ oinfo->atime = 0;
+ oinfo->mtime = 0;
+ oinfo->btime = 0;
+
+ /* Might be information for modification time */
+ if((exists = H5O_msg_exists_oh(oh, H5O_MTIME_ID)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for MTIME message")
+ if(exists > 0) {
+ /* Get "old style" modification time info */
+ if(NULL == H5O_msg_read_oh(loc->file, oh, H5O_MTIME_ID, &oinfo->ctime))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read MTIME message")
} /* end if */
- else
- oinfo->ctime = 0;
- } /* end else */
- } /* end else */
+ else {
+ /* Check for "new style" modification time info */
+ if((exists = H5O_msg_exists_oh(oh, H5O_MTIME_NEW_ID)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for MTIME_NEW message")
+ if(exists > 0) {
+ /* Get "new style" modification time info */
+ if(NULL == H5O_msg_read_oh(loc->file, oh, H5O_MTIME_NEW_ID, &oinfo->ctime))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read MTIME_NEW message")
+ } /* end if */
+ else
+ oinfo->ctime = 0;
+ } /* end else */
+ } /* end else */
+ } /* end if */
- /* Get the information for the object header */
- if(H5O__get_hdr_info_real(oh, &oinfo->hdr) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object header info")
+ /* Get the information for the object header, if requested */
+ if(fields & H5O_INFO_HDR)
+ if(H5O__get_hdr_info_real(oh, &oinfo->hdr) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object header info")
/* Retrieve # of attributes */
- if(H5O_attr_count_real(loc->file, oh, &oinfo->num_attrs) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve attribute count")
+ if(fields & H5O_INFO_NUM_ATTRS)
+ if(H5O_attr_count_real(loc->file, oh, &oinfo->num_attrs) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve attribute count")
/* Get B-tree & heap metadata storage size, if requested */
- if(want_ih_info) {
+ if(fields & H5O_INFO_META_SIZE) {
/* Check for 'bh_info' callback for this type of object */
if(obj_class->bh_info)
/* Call the object's class 'bh_info' routine */
@@ -2317,9 +2324,10 @@ H5O_get_info(const H5O_loc_t *loc, hbool_t want_ih_info, H5O_info_t *oinfo)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object's btree & heap info")
/* Get B-tree & heap info for any attributes */
- if(oinfo->num_attrs > 0)
+ if(!(fields & H5O_INFO_NUM_ATTRS) || oinfo->num_attrs > 0) {
if(H5O__attr_bh_info(loc->file, oh, &oinfo->meta_size.attr) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve attribute btree & heap info")
+ } /* end if */
} /* end if */
done:
@@ -2338,16 +2346,18 @@ done:
* Note: This routine is needed so that there's a non-API routine
* that can set up VOL / SWMR info (which need a DXPL).
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Note: Add a parameter "fields" to indicate selection of object info.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
- * December 28, 2017
+ * December 28, 2017
*
*-------------------------------------------------------------------------
*/
herr_t
-H5O__get_info_by_name(const H5G_loc_t *loc, const char *name, H5O_info_t *oinfo)
+H5O__get_info_by_name(const H5G_loc_t *loc, const char *name, H5O_info_t *oinfo, unsigned fields)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2359,7 +2369,7 @@ H5O__get_info_by_name(const H5G_loc_t *loc, const char *name, H5O_info_t *oinfo)
HDassert(oinfo);
/* Retrieve the object's information */
- if(H5G_loc_info(loc, name, TRUE, oinfo/*out*/) < 0)
+ if(H5G_loc_info(loc, name, oinfo/*out*/, fields) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object info")
done:
@@ -2376,17 +2386,19 @@ done:
* Note: This routine is needed so that there's a non-API routine
* that can set up VOL / SWMR info (which need a DXPL).
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Note: Add a parameter "fields" to indicate selection of object info.
*
- * Programmer: Quincey Koziol
- * December 28, 2017
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Quincey Koziol
+ * December 28, 2017
*
*-------------------------------------------------------------------------
*/
herr_t
H5O__get_info_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo)
+ H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, unsigned fields)
{
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
@@ -2412,7 +2424,7 @@ H5O__get_info_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t id
loc_found = TRUE;
/* Retrieve the object's information */
- if(H5O_get_info(obj_loc.oloc, TRUE, oinfo) < 0)
+ if(H5O_get_info(obj_loc.oloc, oinfo, fields) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object info")
done:
@@ -2793,7 +2805,7 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t *li
H5O_info_t oinfo; /* Object info */
/* Get the object's info */
- if(H5O_get_info(&obj_oloc, TRUE, &oinfo) < 0)
+ if(H5O_get_info(&obj_oloc, &oinfo, udata->fields) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get object info")
/* Make the application callback */
@@ -2833,7 +2845,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5O__visit
*
- * Purpose: Recursively visit an object and all the objects reachable
+ * Purpose: Recursively visit an object and all the objects reachable
* from it. If the starting object is a group, all the objects
* linked to from that group will be visited. Links within
* each group are visited according to the order within the
@@ -2849,22 +2861,24 @@ done:
* iteration index and iteration order given) will be used to in
* the callback about the object.
*
- * Return: Success: The return value of the first operator that
+ * Note: Add a parameter "fields" to indicate selection of object info.
+ *
+ * Return: Success: The return value of the first operator that
* returns non-zero, or zero if all members were
* processed with no operator returning non-zero.
*
- * Failure: Negative if something goes wrong within the
+ * Failure: Negative if something goes wrong within the
* library, or the negative value returned by one
* of the operators.
*
* Programmer: Quincey Koziol
- * November 24 2007
+ * November 24 2007
*
*-------------------------------------------------------------------------
*/
herr_t
H5O__visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
- H5_iter_order_t order, H5O_iterate_t op, void *op_data)
+ H5_iter_order_t order, H5O_iterate_t op, void *op_data, unsigned fields)
{
H5O_iter_visit_ud_t udata; /* User data for callback */
H5G_loc_t loc; /* Location of reference object */
@@ -2896,7 +2910,7 @@ H5O__visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
loc_found = TRUE;
/* Get the object's info */
- if(H5O_get_info(&obj_oloc, TRUE, &oinfo) < 0)
+ if(H5O_get_info(&obj_oloc, &oinfo, fields) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get object info")
/* Open the object */
@@ -2925,6 +2939,7 @@ H5O__visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
udata.start_loc = &start_loc;
udata.op = op;
udata.op_data = op_data;
+ udata.fields = fields;
/* Create skip list to store visited object information */
if((udata.visited = H5SL_create(H5SL_TYPE_OBJ, NULL)) == NULL)
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index f535e50..616f96b 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -567,15 +567,15 @@ H5_DLL int H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted);
H5_DLL herr_t H5O__link(const H5O_loc_t *loc, int adjust);
H5_DLL htri_t H5O__exists_by_name(const H5G_loc_t *loc, const char *name);
H5_DLL herr_t H5O__get_info_by_name(const H5G_loc_t *loc, const char *name,
- H5O_info_t *oinfo);
+ H5O_info_t *oinfo, unsigned fields);
H5_DLL herr_t H5O__get_info_by_idx(const H5G_loc_t *loc, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo);
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, unsigned fields);
H5_DLL herr_t H5O__set_comment_by_name(const H5G_loc_t *loc, const char *name,
const char *comment);
H5_DLL ssize_t H5O__get_comment_by_name(const H5G_loc_t *loc, const char *name,
char *comment, size_t bufsize);
H5_DLL herr_t H5O__visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
- H5_iter_order_t order, H5O_iterate_t op, void *op_data);
+ H5_iter_order_t order, H5O_iterate_t op, void *op_data, unsigned fields);
H5_DLL herr_t H5O__inc_rc(H5O_t *oh);
H5_DLL herr_t H5O__dec_rc(H5O_t *oh);
H5_DLL herr_t H5O__free(H5O_t *oh);
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 696fd38..10063d5 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -881,8 +881,7 @@ H5_DLL herr_t H5O_bogus_oh(H5F_t *f, H5O_t *oh, unsigned mesg_id, unsigned mesg_
#endif /* H5O_ENABLE_BOGUS */
H5_DLL herr_t H5O_delete(H5F_t *f, haddr_t addr);
H5_DLL herr_t H5O_get_hdr_info(const H5O_loc_t *oloc, H5O_hdr_info_t *hdr);
-H5_DLL herr_t H5O_get_info(const H5O_loc_t *oloc, hbool_t want_ih_info,
- H5O_info_t *oinfo);
+H5_DLL herr_t H5O_get_info(const H5O_loc_t *oloc, H5O_info_t *oinfo, unsigned fields);
H5_DLL herr_t H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type);
H5_DLL herr_t H5O_get_create_plist(const H5O_loc_t *loc, struct H5P_genplist_t *oc_plist);
H5_DLL hid_t H5O_open_name(const H5G_loc_t *loc, const char *name, hbool_t app_ref);
diff --git a/src/H5Opublic.h b/src/H5Opublic.h
index 8d6dda4..54869bc 100644
--- a/src/H5Opublic.h
+++ b/src/H5Opublic.h
@@ -73,6 +73,19 @@
#define H5O_SHMESG_MAX_NINDEXES 8
#define H5O_SHMESG_MAX_LIST_SIZE 5000
+/* Flags for H5Oget_info.
+ * Theses flags determine which fields will be filled in in the H5O_info_t
+ * struct. Some fields are always filled in because there is no performance
+ * penalty.
+ * A value of 0 returns basic information: fileno, addr, type, rc and will be
+ * returned regardless.
+ */
+#define H5O_INFO_TIME 0x0001u /* Fill in the atime, mtime, ctime, and btime fields */
+#define H5O_INFO_NUM_ATTRS 0x0002u /* Fill in the num_attrs field */
+#define H5O_INFO_HDR 0x0004u /* Fill in the hdr field */
+#define H5O_INFO_META_SIZE 0x0008u /* Fill in the meta_size field */
+#define H5O_INFO_ALL (H5O_INFO_TIME | H5O_INFO_NUM_ATTRS | H5O_INFO_HDR | H5O_INFO_META_SIZE)
+
/*******************/
/* Public Typedefs */
/*******************/
@@ -156,12 +169,12 @@ H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr);
H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name,
H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id);
H5_DLL htri_t H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id);
-H5_DLL herr_t H5Oget_info(hid_t loc_id, H5O_info_t *oinfo);
-H5_DLL herr_t H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo,
- hid_t lapl_id);
-H5_DLL herr_t H5Oget_info_by_idx(hid_t loc_id, const char *group_name,
+H5_DLL herr_t H5Oget_info2(hid_t loc_id, H5O_info_t *oinfo, unsigned fields);
+H5_DLL herr_t H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info_t *oinfo,
+ unsigned fields, hid_t lapl_id);
+H5_DLL herr_t H5Oget_info_by_idx2(hid_t loc_id, const char *group_name,
H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo,
- hid_t lapl_id);
+ unsigned fields, hid_t lapl_id);
H5_DLL herr_t H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name,
hid_t lcpl_id, hid_t lapl_id);
H5_DLL herr_t H5Oincr_refcount(hid_t object_id);
@@ -174,11 +187,11 @@ H5_DLL herr_t H5Oset_comment_by_name(hid_t loc_id, const char *name,
H5_DLL ssize_t H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize);
H5_DLL ssize_t H5Oget_comment_by_name(hid_t loc_id, const char *name,
char *comment, size_t bufsize, hid_t lapl_id);
-H5_DLL herr_t H5Ovisit(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
- H5O_iterate_t op, void *op_data);
-H5_DLL herr_t H5Ovisit_by_name(hid_t loc_id, const char *obj_name,
+H5_DLL herr_t H5Ovisit2(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
+ H5O_iterate_t op, void *op_data, unsigned fields);
+H5_DLL herr_t H5Ovisit_by_name2(hid_t loc_id, const char *obj_name,
H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op,
- void *op_data, hid_t lapl_id);
+ void *op_data, unsigned fields, hid_t lapl_id);
H5_DLL herr_t H5Oclose(hid_t object_id);
H5_DLL herr_t H5Oflush(hid_t obj_id);
H5_DLL herr_t H5Orefresh(hid_t oid);
@@ -205,7 +218,18 @@ typedef struct H5O_stat_t {
} H5O_stat_t;
/* Function prototypes */
+H5_DLL herr_t H5Oget_info1(hid_t loc_id, H5O_info_t *oinfo);
+H5_DLL herr_t H5Oget_info_by_name1(hid_t loc_id, const char *name, H5O_info_t *oinfo,
+ hid_t lapl_id);
+H5_DLL herr_t H5Oget_info_by_idx1(hid_t loc_id, const char *group_name,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo,
+ hid_t lapl_id);
+H5_DLL herr_t H5Ovisit1(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
+ H5O_iterate_t op, void *op_data);
+H5_DLL herr_t H5Ovisit_by_name1(hid_t loc_id, const char *obj_name,
+ H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op,
+ void *op_data, hid_t lapl_id);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
#ifdef __cplusplus
diff --git a/src/H5vers.txt b/src/H5vers.txt
index 0303bf5..914c30e 100644
--- a/src/H5vers.txt
+++ b/src/H5vers.txt
@@ -56,6 +56,11 @@ FUNCTION: H5Ewalk; H5E_walk, H5E_error; v10, v18
FUNCTION: H5Fget_info; H5F_info; v18, v110
FUNCTION: H5Gcreate; ; v10, v18
FUNCTION: H5Gopen; ; v10, v18
+FUNCTION: H5Oget_info; ; v18, v112
+FUNCTION: H5Oget_info_by_name; ; v18, v112
+FUNCTION: H5Oget_info_by_idx; ; v18, v112
+FUNCTION: H5Ovisit; ; v18, v112
+FUNCTION: H5Ovisit_by_name; ; v18, v112
FUNCTION: H5Pget_filter; ; v10, v18
FUNCTION: H5Pget_filter_by_id; ; v16, v18
FUNCTION: H5Pinsert; ; v14, v18
diff --git a/src/Makefile.am b/src/Makefile.am
index 21f3966..a0defad 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -80,7 +80,7 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
H5HP.c H5I.c H5Itest.c H5L.c H5Lexternal.c H5lib_settings.c \
H5MF.c H5MFaggr.c H5MFdbg.c H5MFsection.c \
H5MM.c H5MP.c H5MPtest.c \
- H5O.c H5Oainfo.c H5Oalloc.c H5Oattr.c \
+ H5O.c H5Odeprec.c H5Oainfo.c H5Oalloc.c H5Oattr.c \
H5Oattribute.c H5Obogus.c H5Obtreek.c H5Ocache.c H5Ocache_image.c \
H5Ochunk.c \
H5Ocont.c H5Ocopy.c H5Odbg.c H5Odrvinfo.c H5Odtype.c H5Oefl.c \
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 7a2bb49..55afa68 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -377,7 +377,7 @@ get_object_header_tag(hid_t loc_id, haddr_t *tag)
H5O_info_t oinfo; /* Object info */
/* Retrieve the info for the object */
- if(H5Oget_info(loc_id, &oinfo) < 0)
+ if(H5Oget_info2(loc_id, &oinfo, 0) < 0)
TEST_ERROR;
/* Set the tag to return */
@@ -2937,7 +2937,7 @@ check_object_info_tags(void)
/* Get information on an object by name */
/* ===================================== */
- if ( H5Oget_info_by_name(fid, GROUPNAME, &oinfo, H5P_DEFAULT) < 0 ) TEST_ERROR;
+ if ( H5Oget_info_by_name2(fid, GROUPNAME, &oinfo, 0, H5P_DEFAULT) < 0 ) TEST_ERROR;
/* =================================== */
/* Verification of Metadata Tag Values */
@@ -2956,8 +2956,6 @@ check_object_info_tags(void)
/* Verify dataset's tagged metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, g_tag) < 0 ) TEST_ERROR;
- if ( verify_tag(fid, H5AC_BT_ID, g_tag) < 0 ) TEST_ERROR;
- if ( verify_tag(fid, H5AC_LHEAP_PRFX_ID, g_tag) < 0 ) TEST_ERROR;
/* verify no other entries present */
if ( verify_no_unknown_tags(fid) < 0 ) TEST_ERROR;
@@ -3585,8 +3583,6 @@ check_external_link_open_tags(void)
/* verify tag value of linked group's object header */
if ( verify_tag(fid2, H5AC_OHDR_ID, link_tag) < 0 ) TEST_ERROR;
- if ( verify_tag(fid2, H5AC_LHEAP_PRFX_ID, link_tag) < 0 ) TEST_ERROR;
- if ( verify_tag(fid2, H5AC_BT_ID, link_tag) < 0 ) TEST_ERROR;
/* verify no other entries present */
if ( verify_no_unknown_tags(fid) < 0 ) TEST_ERROR;
diff --git a/test/cork.c b/test/cork.c
index 8c685ee..7487a9e 100644
--- a/test/cork.c
+++ b/test/cork.c
@@ -126,7 +126,7 @@ verify_old_dset_cork(void)
TEST_ERROR
/* Get dataset object header address: DSET_BT1 */
- if(H5Oget_info(did, &oinfo) < 0)
+ if(H5Oget_info2(did, &oinfo, 0) < 0)
TEST_ERROR
/* Cork the dataset: DSET_BT1 */
@@ -163,7 +163,7 @@ verify_old_dset_cork(void)
FAIL_STACK_ERROR
/* Get dataset object address */
- if(H5Oget_info(did2, &oinfo2) < 0)
+ if(H5Oget_info2(did2, &oinfo2, 0) < 0)
TEST_ERROR
/* Cork the dataset: DSET_COMPACT */
@@ -216,7 +216,7 @@ verify_old_dset_cork(void)
FAIL_STACK_ERROR
/* Get dataset object address: DSET_CONTIG */
- if(H5Oget_info(did3, &oinfo3) < 0)
+ if(H5Oget_info2(did3, &oinfo3, 0) < 0)
TEST_ERROR
/* Cork the dataset: DSET_CONTIG */
@@ -329,7 +329,7 @@ verify_obj_dset_cork(hbool_t swmr)
TEST_ERROR
/* Get dataset object header address */
- if(H5Oget_info(did, &oinfo) < 0)
+ if(H5Oget_info2(did, &oinfo, 0) < 0)
TEST_ERROR
/* Verify cork status of the dataset: DSET */
@@ -372,7 +372,7 @@ verify_obj_dset_cork(hbool_t swmr)
TEST_ERROR
/* Get dataset object header address */
- if(H5Oget_info(did2, &oinfo2) < 0)
+ if(H5Oget_info2(did2, &oinfo2, 0) < 0)
TEST_ERROR
/* Cork the dataset: DSET_NONE */
@@ -546,7 +546,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR
/* Get dataset object header address: DSET_EA */
- if(H5Oget_info(did, &oinfo) < 0)
+ if(H5Oget_info2(did, &oinfo, 0) < 0)
TEST_ERROR
/* Cork the dataset: DSET_EA */
@@ -564,7 +564,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR
/* Get dataset object header address: DSET_FA */
- if(H5Oget_info(did2, &oinfo2) < 0)
+ if(H5Oget_info2(did2, &oinfo2, 0) < 0)
TEST_ERROR
/* Cork the dataset: DSET_FA */
@@ -591,7 +591,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format)
TEST_ERROR
/* Get dataset object header address: DSET_BT2 */
- if(H5Oget_info(did3, &oinfo3) < 0)
+ if(H5Oget_info2(did3, &oinfo3, 0) < 0)
TEST_ERROR
/* Cork the dataset: DSET_BT2 */
@@ -770,11 +770,11 @@ verify_group_cork(hbool_t swmr)
TEST_ERROR
/* Get group object header addresses */
- if(H5Oget_info(gid, &oinfo) < 0)
+ if(H5Oget_info2(gid, &oinfo, 0) < 0)
TEST_ERROR
- if(H5Oget_info(gid2, &oinfo2) < 0)
+ if(H5Oget_info2(gid2, &oinfo2, 0) < 0)
TEST_ERROR
- if(H5Oget_info(gid3, &oinfo3) < 0)
+ if(H5Oget_info2(gid3, &oinfo3, 0) < 0)
TEST_ERROR
/* Verify cork status of the groups */
@@ -959,11 +959,11 @@ verify_named_cork(hbool_t swmr)
TEST_ERROR
/* Get named datatype object header addresses */
- if(H5Oget_info(tid, &oinfo) < 0)
+ if(H5Oget_info2(tid, &oinfo, 0) < 0)
TEST_ERROR
- if(H5Oget_info(tid2, &oinfo2) < 0)
+ if(H5Oget_info2(tid2, &oinfo2, 0) < 0)
TEST_ERROR
- if(H5Oget_info(tid3, &oinfo3) < 0)
+ if(H5Oget_info2(tid3, &oinfo3, 0) < 0)
TEST_ERROR
/* Verify cork status of the named datatypes */
@@ -1063,7 +1063,7 @@ verify_named_cork(hbool_t swmr)
FAIL_STACK_ERROR
/* Get dataset object header address */
- if(H5Oget_info(did, &oinfo4) < 0)
+ if(H5Oget_info2(did, &oinfo4, 0) < 0)
TEST_ERROR
/* Cork the dataset: DSET */
@@ -1277,7 +1277,7 @@ verify_multiple_cork(hbool_t swmr)
TEST_ERROR
/* Verify cork status of the group: gid2 */
- if(H5Oget_info(gid2, &oinfo1) < 0)
+ if(H5Oget_info2(gid2, &oinfo1, 0) < 0)
TEST_ERROR
if(H5C__verify_cork_tag_test(fid2, oinfo1.addr, TRUE) < 0)
TEST_ERROR
@@ -1305,7 +1305,7 @@ verify_multiple_cork(hbool_t swmr)
TEST_ERROR
/* Verify cork status of the dataset: did1 */
- if(H5Oget_info(did1, &oinfo2) < 0)
+ if(H5Oget_info2(did1, &oinfo2, 0) < 0)
TEST_ERROR
if(H5C__verify_cork_tag_test(fid1, oinfo2.addr, TRUE) < 0)
TEST_ERROR
@@ -1333,7 +1333,7 @@ verify_multiple_cork(hbool_t swmr)
TEST_ERROR
/* Verify cork status of the datatype: tid2 */
- if(H5Oget_info(tid2, &oinfo3) < 0)
+ if(H5Oget_info2(tid2, &oinfo3, 0) < 0)
TEST_ERROR
if(H5C__verify_cork_tag_test(fid2, oinfo3.addr, TRUE) < 0)
TEST_ERROR
@@ -1349,7 +1349,7 @@ verify_multiple_cork(hbool_t swmr)
TEST_ERROR
/* Verify cork status of the group: gid1 */
- if(H5Oget_info(gid1, &oinfo1) < 0)
+ if(H5Oget_info2(gid1, &oinfo1, 0) < 0)
TEST_ERROR
if(H5C__verify_cork_tag_test(fid1, oinfo1.addr, FALSE) < 0)
TEST_ERROR
@@ -1383,7 +1383,7 @@ verify_multiple_cork(hbool_t swmr)
TEST_ERROR
/* Verify cork status of the dataset: did2 */
- if(H5Oget_info(did2, &oinfo2) < 0)
+ if(H5Oget_info2(did2, &oinfo2, 0) < 0)
TEST_ERROR
if(H5C__verify_cork_tag_test(fid2, oinfo2.addr, FALSE) < 0)
TEST_ERROR
diff --git a/test/dsets.c b/test/dsets.c
index ca1e3d5..ebe7f68 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -10719,9 +10719,9 @@ test_earray_hdr_fd(const char *env_h5_driver, hid_t fapl)
FAIL_STACK_ERROR;
/* The second call triggered a bug in the library (JIRA issue: SWMR-95) */
- if(H5Oget_info_by_name(fid, DSET_EARRAY_HDR_FD, &info, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(fid, DSET_EARRAY_HDR_FD, &info, 0, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if(H5Oget_info_by_name(fid, DSET_EARRAY_HDR_FD, &info, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(fid, DSET_EARRAY_HDR_FD, &info, 0, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
if(H5Pclose(fapl) < 0)
@@ -10839,9 +10839,9 @@ test_farray_hdr_fd(const char *env_h5_driver, hid_t fapl)
FAIL_STACK_ERROR;
/* The second call triggered a bug in the library (JIRA issue: SWMR-95) */
- if(H5Oget_info_by_name(fid, DSET_FARRAY_HDR_FD, &info, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(fid, DSET_FARRAY_HDR_FD, &info, 0, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if(H5Oget_info_by_name(fid, DSET_FARRAY_HDR_FD, &info, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(fid, DSET_FARRAY_HDR_FD, &info, 0, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
if(H5Pclose(fapl) < 0)
@@ -10959,9 +10959,9 @@ test_bt2_hdr_fd(const char *env_h5_driver, hid_t fapl)
FAIL_STACK_ERROR;
/* The second call triggered a bug in the library (JIRA issue: SWMR-95) */
- if(H5Oget_info_by_name(fid, DSET_BT2_HDR_FD, &info, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(fid, DSET_BT2_HDR_FD, &info, 0, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if(H5Oget_info_by_name(fid, DSET_BT2_HDR_FD, &info, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(fid, DSET_BT2_HDR_FD, &info, 0, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
if(H5Pclose(fapl) < 0)
@@ -12680,7 +12680,7 @@ dls_01_read_stuff( hid_t fid ) {
did = H5Dopen2( fid, DLS_01_DATASET, H5P_DEFAULT );
if ( did <= 0 ) TEST_ERROR
- status = H5Oget_info( did, &info );
+ status = H5Oget_info2( did, &info, 0 );
if ( status != 0 ) TEST_ERROR
status = H5Dclose( did );
diff --git a/test/dtypes.c b/test/dtypes.c
index 1a27634..3253d6c 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -5897,7 +5897,7 @@ test_latest(void)
FAIL_STACK_ERROR
/* Get information about datatype on disk */
- if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(file, compnd_type, &oi, H5O_INFO_HDR, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
old_dtype_oh_size = oi.hdr.space.total;
@@ -5922,7 +5922,7 @@ test_latest(void)
FAIL_STACK_ERROR
/* Get information about datatype on disk */
- if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(file, compnd_type, &oi, H5O_INFO_HDR, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
/* Check that the object header info is still the same */
@@ -5958,7 +5958,7 @@ test_latest(void)
FAIL_STACK_ERROR
/* Get information about datatype on disk */
- if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(file, compnd_type, &oi, H5O_INFO_HDR, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
new_dtype_oh_size = oi.hdr.space.total;
@@ -5987,7 +5987,7 @@ test_latest(void)
FAIL_STACK_ERROR
/* Get information about datatype on disk */
- if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(file, compnd_type, &oi, H5O_INFO_HDR, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
/* Check that the object header info is still the same */
diff --git a/test/flushrefresh.c b/test/flushrefresh.c
index 0775dee..9348a10 100644
--- a/test/flushrefresh.c
+++ b/test/flushrefresh.c
@@ -848,7 +848,7 @@ herr_t flush_verification(const char * obj_pathname, const char * expected)
H5E_BEGIN_TRY {
fid = H5Fopen(FILENAME, H5F_ACC_SWMR_READ, H5P_DEFAULT);
oid = H5Oopen(fid, obj_pathname, H5P_DEFAULT);
- status = H5Oget_info(oid, &oinfo);
+ status = H5Oget_info2(oid, &oinfo, 0);
} H5E_END_TRY;
/* Compare to expected result */
@@ -989,7 +989,7 @@ herr_t refresh_verification(const char * obj_pathname)
if((oid = H5Oopen(fid, obj_pathname, H5P_DEFAULT)) < 0) PROCESS_ERROR;
/* Get Object info */
- if((status = H5Oget_info(oid, &flushed_oinfo)) < 0) PROCESS_ERROR;
+ if((status = H5Oget_info2(oid, &flushed_oinfo, H5O_INFO_NUM_ATTRS|H5O_INFO_HDR)) < 0) PROCESS_ERROR;
/* Make sure there are no attributes on the object. This is just a sanity
check to ensure we didn't erroneously flush the attribute before
@@ -1008,7 +1008,7 @@ herr_t refresh_verification(const char * obj_pathname)
/* Get object info again. This will NOT reflect what's on disk, only what's
in the cache. Thus, all values will be unchanged from above, despite
newer information being on disk. */
- if((status = H5Oget_info(oid, &refreshed_oinfo)) < 0) PROCESS_ERROR;
+ if((status = H5Oget_info2(oid, &refreshed_oinfo, H5O_INFO_NUM_ATTRS|H5O_INFO_HDR)) < 0) PROCESS_ERROR;
/* Verify that before doing a refresh, getting the object info returns stale
information. (i.e., unchanged from above, despite new info on disk). */
@@ -1046,7 +1046,7 @@ herr_t refresh_verification(const char * obj_pathname)
} /* end else */
/* Get object info. This should now accurately reflect the refreshed object on disk. */
- if((status = H5Oget_info(oid, &refreshed_oinfo)) < 0) PROCESS_ERROR;
+ if((status = H5Oget_info2(oid, &refreshed_oinfo, H5O_INFO_NUM_ATTRS|H5O_INFO_HDR)) < 0) PROCESS_ERROR;
/* Confirm following (first 4) attributes are the same: */
/* Confirm following (last 4) attributes are different */
diff --git a/test/genall5.c b/test/genall5.c
index e3a9c96..69ff964 100644
--- a/test/genall5.c
+++ b/test/genall5.c
@@ -650,7 +650,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
HDassert(H5L_TYPE_HARD == lnk_info.type);
memset(&root_oinfo, 0, sizeof(root_oinfo));
- ret = H5Oget_info(fid, &root_oinfo);
+ ret = H5Oget_info2(fid, &root_oinfo, 0);
if ( ret < 0 ) {
@@ -1130,7 +1130,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
HDassert(H5L_TYPE_HARD == lnk_info.type);
memset(&root_oinfo, 0, sizeof(root_oinfo));
- ret = H5Oget_info(fid, &root_oinfo);
+ ret = H5Oget_info2(fid, &root_oinfo, 0);
if ( ret < 0 ) {
pass = FALSE;
@@ -1825,7 +1825,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
HDassert(H5L_TYPE_HARD == lnk_info.type);
memset(&root_oinfo, 0, sizeof(root_oinfo));
- ret = H5Oget_info(fid, &root_oinfo);
+ ret = H5Oget_info2(fid, &root_oinfo, 0);
if ( ret < 0 ) {
diff --git a/test/getname.c b/test/getname.c
index c3f3c54..a6ef2d1 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -2390,7 +2390,7 @@ test_main(hid_t file_id, hid_t fapl)
if((size = H5Iget_name(dtype_anon, NULL,0)) != 0) TEST_ERROR
/* Store the address of the datatype for later use */
- if(H5Oget_info(dtype_anon, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(dtype_anon, &oinfo, 0) < 0) TEST_ERROR
/* Update the reference count to dtype_anon to preserve the datatype */
if(H5Oincr_refcount(dtype_anon) < 0) TEST_ERROR
diff --git a/test/h5test.c b/test/h5test.c
index bbdd58b..5d944ee 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -1694,8 +1694,8 @@ h5_verify_cached_stabs(const char *base_name[], hid_t fapl)
continue;
} /* end if */
- if(H5Ovisit(file, H5_INDEX_NAME, H5_ITER_NATIVE,
- h5_verify_cached_stabs_cb, NULL) < 0)
+ if(H5Ovisit2(file, H5_INDEX_NAME, H5_ITER_NATIVE,
+ h5_verify_cached_stabs_cb, NULL, 0) < 0)
goto error;
if(H5Fclose(file) < 0)
diff --git a/test/links.c b/test/links.c
index 4e88af5..80f9481 100644
--- a/test/links.c
+++ b/test/links.c
@@ -541,8 +541,8 @@ cklinks(hid_t fapl, hbool_t new_format)
if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) FAIL_STACK_ERROR
/* Hard link */
- if(H5Oget_info_by_name(file, "d1", &oinfo1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
- if(H5Oget_info_by_name(file, "grp1/hard", &oinfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file, "d1", &oinfo1, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file, "grp1/hard", &oinfo2, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(H5O_TYPE_DATASET != oinfo2.type) {
H5_FAILED();
printf(" %d: Unexpected object type should have been a dataset\n", __LINE__);
@@ -577,7 +577,7 @@ cklinks(hid_t fapl, hbool_t new_format)
} /* end if */
/* Symbolic link */
- if(H5Oget_info_by_name(file, "grp1/soft", &oinfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file, "grp1/soft", &oinfo2, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(H5O_TYPE_DATASET != oinfo2.type) {
H5_FAILED();
printf(" %d: Unexpected object type should have been a dataset\n", __LINE__);
@@ -599,7 +599,7 @@ cklinks(hid_t fapl, hbool_t new_format)
/* Dangling link */
H5E_BEGIN_TRY {
- status = H5Oget_info_by_name(file, "grp1/dangle", &oinfo2, H5P_DEFAULT);
+ status = H5Oget_info_by_name2(file, "grp1/dangle", &oinfo2, 0, H5P_DEFAULT);
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
@@ -626,7 +626,7 @@ cklinks(hid_t fapl, hbool_t new_format)
/* Recursive link */
H5E_BEGIN_TRY {
- status = H5Oget_info_by_name(file, "grp1/recursive", &oinfo2, H5P_DEFAULT);
+ status = H5Oget_info_by_name2(file, "grp1/recursive", &oinfo2, 0, H5P_DEFAULT);
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
@@ -696,11 +696,11 @@ ck_new_links(hid_t fapl, hbool_t new_format)
if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR
/* Get hard link info */
- if(H5Oget_info_by_name(file, "/grp1/dataset2", &oi_dset, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(file, "/grp1/dataset2", &oi_dset, 0, H5P_DEFAULT) < 0)
TEST_ERROR
- if(H5Oget_info_by_name(file, "/grp1/hard1", &oi_hard1, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(file, "/grp1/hard1", &oi_hard1, 0, H5P_DEFAULT) < 0)
TEST_ERROR
- if(H5Oget_info_by_name(file, "/grp2/hard2", &oi_hard2, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(file, "/grp2/hard2", &oi_hard2, 0, H5P_DEFAULT) < 0)
TEST_ERROR
/* Check hard links */
@@ -1504,7 +1504,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
/* Get the group's link's information */
if(H5Lget_info(file_id, "group", &linfo, H5P_DEFAULT) < 0) TEST_ERROR
- if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(file_id, "group", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR
old_cset = linfo.cset;
if(old_cset != H5T_CSET_UTF8) TEST_ERROR
if(linfo.corder_valid != TRUE) TEST_ERROR
@@ -1523,7 +1523,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
/* Get the link's character set & modification time . They should be unchanged */
if(H5Lget_info(file_id, "group", &linfo, H5P_DEFAULT) < 0) TEST_ERROR
- if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(file_id, "group", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR
if(old_modification_time != oinfo.mtime) TEST_ERROR
if(old_cset != linfo.cset) TEST_ERROR
if(linfo.corder_valid != TRUE) TEST_ERROR
@@ -1531,7 +1531,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
/* Create a new link to the group. It should have a different creation order value but the same modification time */
if(H5Lcreate_hard(file_id, "group", file_id, "group2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
- if(H5Oget_info_by_name(file_id, "group2", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(file_id, "group2", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR
if(old_modification_time != oinfo.mtime) TEST_ERROR
if(H5Lget_info(file_id, "group2", &linfo, H5P_DEFAULT) < 0) TEST_ERROR
if(old_corder == linfo.corder) TEST_ERROR
@@ -1544,7 +1544,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
* should not change.
*/
if(H5Lcopy(file_id, "group", file_id, "group_copied", lcpl_id, H5P_DEFAULT) < 0) TEST_ERROR
- if(H5Oget_info_by_name(file_id, "group_copied", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(file_id, "group_copied", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR
if(old_modification_time != oinfo.mtime) TEST_ERROR
if(H5Lget_info(file_id, "group_copied", &linfo, H5P_DEFAULT) < 0) TEST_ERROR
if(linfo.corder_valid != TRUE) TEST_ERROR
@@ -1555,7 +1555,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
/* Move the link with the default property list. */
if(H5Lmove(file_id, "group_copied", file_id, "group_copied2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
- if(H5Oget_info_by_name(file_id, "group_copied2", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(file_id, "group_copied2", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR
if(old_modification_time != oinfo.mtime) TEST_ERROR
if(H5Lget_info(file_id, "group_copied2", &linfo, H5P_DEFAULT) < 0) TEST_ERROR
if(linfo.corder_valid != TRUE) TEST_ERROR
@@ -1565,7 +1565,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
if(linfo.cset == H5T_CSET_UTF8) TEST_ERROR
/* Check that the original link is unchanged */
- if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(file_id, "group", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR
if(old_modification_time != oinfo.mtime) TEST_ERROR
if(H5Lget_info(file_id, "group", &linfo, H5P_DEFAULT) < 0) TEST_ERROR
if(linfo.corder_valid != TRUE) TEST_ERROR
@@ -1576,7 +1576,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
* Its creation order value will change, but modification time should not
* change. */
if(H5Lmove(file_id, "group", file_id, "group_moved", lcpl_id, H5P_DEFAULT) < 0) TEST_ERROR
- if(H5Oget_info_by_name(file_id, "group_moved", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(file_id, "group_moved", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR
if(old_modification_time != oinfo.mtime) TEST_ERROR
if(H5Lget_info(file_id, "group_moved", &linfo, H5P_DEFAULT) < 0) TEST_ERROR
if(linfo.corder_valid != TRUE) TEST_ERROR
@@ -1587,7 +1587,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format)
/* Move the link again using the default property list. */
if(H5Lmove(file_id, "group_moved", file_id, "group_moved_again", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
- if(H5Oget_info_by_name(file_id, "group_moved_again", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(file_id, "group_moved_again", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR
if(old_modification_time != oinfo.mtime) TEST_ERROR
if(H5Lget_info(file_id, "group_moved_again", &linfo, H5P_DEFAULT) < 0) TEST_ERROR
if(linfo.corder_valid != TRUE) TEST_ERROR
@@ -5377,7 +5377,7 @@ external_link_query(hid_t fapl, hbool_t new_format)
if(HDstrcmp(object_name, "/dst")) TEST_ERROR
/* Query information about object that external link points to */
- if(H5Oget_info_by_name(fid, "src", &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(fid, "src", &oi, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(H5O_TYPE_GROUP != oi.type) {
H5_FAILED();
HDputs(" Unexpected object type - should have been a group");
@@ -6110,8 +6110,8 @@ external_link_closing(hid_t fapl, hbool_t new_format)
/* Test that getting info works */
if(H5Lget_info(fid1, "elink/elink/elink/type1", &li, H5P_DEFAULT) < 0) TEST_ERROR
if(H5Lget_info(fid1, "elink/elink/elink", &li, H5P_DEFAULT) < 0) TEST_ERROR
- if(H5Oget_info_by_name(fid1, "elink/elink/elink/type1", &oi, H5P_DEFAULT) < 0) TEST_ERROR
- if(H5Oget_info_by_name(fid1, "elink/elink/elink", &oi, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(fid1, "elink/elink/elink/type1", &oi, 0, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(fid1, "elink/elink/elink", &oi, 0, H5P_DEFAULT) < 0) TEST_ERROR
/* Test move */
if(H5Lmove(fid1, "elink/elink/elink/group1", fid1,
@@ -6198,7 +6198,7 @@ external_link_closing(hid_t fapl, hbool_t new_format)
if(H5Gclose(gid) < 0) TEST_ERROR
if((gid = H5Gcreate2(fid1, "elink/elink2/group2/group3/group4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
- if(H5Oget_info_by_name(fid1, "elink/elink2/group2/group3/group4", &oi, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(fid1, "elink/elink2/group2/group3/group4", &oi, 0, H5P_DEFAULT) < 0) TEST_ERROR
/* Add a few regular groups and a soft link in file2 using intermediate group creation */
if((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0) TEST_ERROR
@@ -9608,13 +9608,13 @@ obj_visit(hid_t fapl, hbool_t new_format)
/* Visit all the objects reachable from the root group (with file ID) */
udata.idx = 0;
udata.info = new_format ? ovisit0_new : ovisit0_old;
- if(H5Ovisit(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata) < 0) FAIL_STACK_ERROR
+ if(H5Ovisit2(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, 0) < 0) FAIL_STACK_ERROR
/* Visit all the objects reachable from the root group (with group ID) */
if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
udata.idx = 0;
udata.info = new_format ? ovisit0_new : ovisit0_old;
- if(H5Ovisit(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata) < 0) FAIL_STACK_ERROR
+ if(H5Ovisit2(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, 0) < 0) FAIL_STACK_ERROR
if(H5Gclose(gid) < 0) FAIL_STACK_ERROR
@@ -9622,13 +9622,13 @@ obj_visit(hid_t fapl, hbool_t new_format)
if((gid = H5Gopen2(fid, "/Group1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
udata.idx = 0;
udata.info = new_format ? ovisit1_new : ovisit1_old;
- if(H5Ovisit(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata) < 0) FAIL_STACK_ERROR
+ if(H5Ovisit2(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, 0) < 0) FAIL_STACK_ERROR
if(H5Gclose(gid) < 0) FAIL_STACK_ERROR
if((gid = H5Gopen2(fid, "/Group1/Group2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
udata.idx = 0;
udata.info = new_format ? ovisit2_new : ovisit2_old;
- if(H5Ovisit(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata) < 0) FAIL_STACK_ERROR
+ if(H5Ovisit2(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, 0) < 0) FAIL_STACK_ERROR
if(H5Gclose(gid) < 0) FAIL_STACK_ERROR
@@ -9678,36 +9678,36 @@ obj_visit_by_name(hid_t fapl, hbool_t new_format)
/* Visit all the objects reachable from the root group (with file ID) */
udata.idx = 0;
udata.info = new_format ? ovisit0_new : ovisit0_old;
- if(H5Ovisit_by_name(fid, "/", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Ovisit_by_name2(fid, "/", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Visit all the objects reachable from the root group (with group ID) */
if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
udata.idx = 0;
udata.info = new_format ? ovisit0_new : ovisit0_old;
- if(H5Ovisit_by_name(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Ovisit_by_name2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(H5Gclose(gid) < 0) FAIL_STACK_ERROR
/* Visit all the objects reachable from each internal group */
udata.idx = 0;
udata.info = new_format ? ovisit1_new : ovisit1_old;
- if(H5Ovisit_by_name(fid, "/Group1", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Ovisit_by_name2(fid, "/Group1", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if((gid = H5Gopen2(fid, "/Group1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
udata.idx = 0;
udata.info = new_format ? ovisit1_new : ovisit1_old;
- if(H5Ovisit_by_name(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Ovisit_by_name2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(H5Gclose(gid) < 0) FAIL_STACK_ERROR
udata.idx = 0;
udata.info = new_format ? ovisit2_new : ovisit2_old;
- if(H5Ovisit_by_name(fid, "/Group1/Group2", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Ovisit_by_name2(fid, "/Group1/Group2", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if((gid = H5Gopen2(fid, "/Group1/Group2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
udata.idx = 0;
udata.info = new_format ? ovisit2_new : ovisit2_old;
- if(H5Ovisit_by_name(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Ovisit_by_name2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(H5Gclose(gid) < 0) FAIL_STACK_ERROR
@@ -9784,15 +9784,15 @@ obj_visit_stop(hid_t fapl, hbool_t new_format)
* returns H5_ITER_STOP
*/
nvisited = 0;
- if((ret = H5Ovisit(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_stop_cb, &nvisited)) < 0)
+ if((ret = H5Ovisit2(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_stop_cb, &nvisited, 0)) < 0)
FAIL_STACK_ERROR
if(ret != H5_ITER_STOP) TEST_ERROR
if(nvisited != 1) TEST_ERROR
/* Same test with H5Ovisit_by_name */
nvisited = 0;
- if((ret = H5Ovisit_by_name(fid, "/", H5_INDEX_NAME, H5_ITER_INC, visit_obj_stop_cb,
- &nvisited, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((ret = H5Ovisit_by_name2(fid, "/", H5_INDEX_NAME, H5_ITER_INC, visit_obj_stop_cb,
+ &nvisited, 0, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
if(ret != H5_ITER_STOP) TEST_ERROR
if(nvisited != 1) TEST_ERROR
@@ -11596,7 +11596,7 @@ link_info_by_idx_old(hid_t fapl)
if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
- if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR
+ if(H5Oget_info2(group_id2, &oi, 0) < 0) TEST_ERROR
objno[u] = oi.addr;
/* Close group */
@@ -12095,7 +12095,7 @@ delete_by_idx_old(hid_t fapl)
if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
- if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR
+ if(H5Oget_info2(group_id2, &oi, 0) < 0) TEST_ERROR
objno[u] = oi.addr;
/* Close group */
@@ -12168,7 +12168,7 @@ delete_by_idx_old(hid_t fapl)
if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
- if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR
+ if(H5Oget_info2(group_id2, &oi, 0) < 0) TEST_ERROR
objno[u] = oi.addr;
/* Close group */
@@ -13163,7 +13163,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id,
if((obj_id = H5Oopen_by_idx(group_id, ".", idx_type, order, (hsize_t)u, H5P_DEFAULT)) < 0) TEST_ERROR
/* Get the object's information */
- if(H5Oget_info(obj_id, &oi) < 0) TEST_ERROR
+ if(H5Oget_info2(obj_id, &oi, 0) < 0) TEST_ERROR
/* Check that the object is the correct one */
if(order == H5_ITER_INC) {
@@ -13189,7 +13189,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id,
*/
/* Get the address of the root group in the file to mount */
- if(H5Oget_info(mount_file_id, &oi) < 0) TEST_ERROR
+ if(H5Oget_info2(mount_file_id, &oi, 0) < 0) TEST_ERROR
mnt_root_addr = oi.addr;
/* Mount a file over a group in main group */
@@ -13201,7 +13201,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id,
if((obj_id = H5Oopen_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)mnt_idx, H5P_DEFAULT)) < 0) TEST_ERROR
/* Get the object's information */
- if(H5Oget_info(obj_id, &oi) < 0) TEST_ERROR
+ if(H5Oget_info2(obj_id, &oi, 0) < 0) TEST_ERROR
/* Check that the object is the root of the mounted file and not in the previous file */
if(H5F_addr_ne(oi.addr, mnt_root_addr)) TEST_ERROR
@@ -13352,7 +13352,7 @@ open_by_idx(hid_t fapl)
if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
- if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR
+ if(H5Oget_info2(group_id2, &oi, 0) < 0) TEST_ERROR
objno[u] = oi.addr;
/* Close group created */
@@ -13387,7 +13387,7 @@ open_by_idx(hid_t fapl)
if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
- if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR
+ if(H5Oget_info2(group_id2, &oi, 0) < 0) TEST_ERROR
objno[u] = oi.addr;
/* Close group created */
@@ -13529,7 +13529,7 @@ open_by_idx_old(hid_t fapl)
if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
- if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR
+ if(H5Oget_info2(group_id2, &oi, 0) < 0) TEST_ERROR
objno[u] = oi.addr;
/* Close group created */
@@ -13623,14 +13623,14 @@ object_info_check(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_type,
sprintf(objname, "filler %02u", u);
/* Query the object's information, by name */
- if(H5Oget_info_by_name(group_id, objname, &oinfo, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(group_id, objname, &oinfo, H5O_INFO_NUM_ATTRS, H5P_DEFAULT) < 0) TEST_ERROR
/* Check that the object is the correct one */
if(H5F_addr_ne(oinfo.addr, objno[u])) TEST_ERROR
if(H5F_addr_ne(oinfo.num_attrs, u)) TEST_ERROR
/* Query the object's information, by index */
- if(H5Oget_info_by_idx(group_id, ".", idx_type, order, (hsize_t)u, &oinfo, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_idx2(group_id, ".", idx_type, order, (hsize_t)u, &oinfo, H5O_INFO_NUM_ATTRS, H5P_DEFAULT) < 0) TEST_ERROR
/* Check that the object is the correct one */
if(order == H5_ITER_INC) {
@@ -13772,7 +13772,7 @@ object_info(hid_t fapl)
/* Check for out of bound query by index on empty group */
H5E_BEGIN_TRY {
- ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &oinfo, 0, H5P_DEFAULT);
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
@@ -13788,7 +13788,7 @@ object_info(hid_t fapl)
if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
- if(H5Oget_info(group_id2, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(group_id2, &oinfo, 0) < 0) TEST_ERROR
objno[u] = oinfo.addr;
/* Create attributes on new object */
@@ -13816,7 +13816,7 @@ object_info(hid_t fapl)
/* Check for out of bound query by index */
H5E_BEGIN_TRY {
- ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, 0, H5P_DEFAULT);
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
@@ -13836,7 +13836,7 @@ object_info(hid_t fapl)
if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
- if(H5Oget_info(group_id2, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(group_id2, &oinfo, 0) < 0) TEST_ERROR
objno[u] = oinfo.addr;
/* Create attributes on new object */
@@ -13864,7 +13864,7 @@ object_info(hid_t fapl)
/* Check for out of bound query by index */
H5E_BEGIN_TRY {
- ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, 0, H5P_DEFAULT);
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
@@ -13969,7 +13969,7 @@ object_info_old(hid_t fapl)
/* Check for out of bound query by index on empty group */
H5E_BEGIN_TRY {
- ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &oinfo, 0, H5P_DEFAULT);
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
@@ -13985,7 +13985,7 @@ object_info_old(hid_t fapl)
if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
- if(H5Oget_info(group_id2, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(group_id2, &oinfo, 0) < 0) TEST_ERROR
objno[u] = oinfo.addr;
/* Create attributes on new object */
@@ -14013,13 +14013,13 @@ object_info_old(hid_t fapl)
/* Check for out of bound query by index */
H5E_BEGIN_TRY {
- ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, 0, H5P_DEFAULT);
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
/* Check for creation order index query */
H5E_BEGIN_TRY {
- ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, order, (hsize_t)(u - 1), &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_CRT_ORDER, order, (hsize_t)(u - 1), &oinfo, 0, H5P_DEFAULT);
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
@@ -14779,8 +14779,8 @@ timestamps(hid_t fapl)
if(track_times != TRUE) TEST_ERROR
/* Query the object information for each group */
- if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR
- if(H5Oget_info(group_id2, &oinfo2) < 0) TEST_ERROR
+ if(H5Oget_info2(group_id, &oinfo, H5O_INFO_TIME|H5O_INFO_HDR) < 0) TEST_ERROR
+ if(H5Oget_info2(group_id2, &oinfo2, H5O_INFO_TIME|H5O_INFO_HDR) < 0) TEST_ERROR
/* Sanity check object information for each group */
if(oinfo.atime != 0) TEST_ERROR
@@ -14826,8 +14826,8 @@ timestamps(hid_t fapl)
if(track_times != TRUE) TEST_ERROR
/* Query the object information for each group */
- if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR
- if(H5Oget_info(group_id2, &oinfo2) < 0) TEST_ERROR
+ if(H5Oget_info2(group_id, &oinfo, H5O_INFO_TIME|H5O_INFO_HDR) < 0) TEST_ERROR
+ if(H5Oget_info2(group_id2, &oinfo2, H5O_INFO_TIME|H5O_INFO_HDR) < 0) TEST_ERROR
/* Sanity check object information for each group */
if(oinfo.atime != 0) TEST_ERROR
diff --git a/test/mount.c b/test/mount.c
index d2c0d21..dad780a 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -412,7 +412,7 @@ test_hide(hid_t fapl)
FAIL_STACK_ERROR
/* Get information about file1:/mnt1/file1 for later */
- if(H5Oget_info_by_name(file1, "/mnt1/file1", &oi1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "/mnt1/file1", &oi1, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Build the virtual file */
if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
@@ -431,7 +431,7 @@ test_hide(hid_t fapl)
* The original objects under file1:/mnt1 are still accessible by their
* other names. This is a rather stupid test but demonstrates a point.
*/
- if(H5Oget_info_by_name(file1, "/file1", &oi2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "/file1", &oi2, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(oi1.fileno != oi2.fileno || H5F_addr_ne(oi1.addr, oi2.addr)) {
H5_FAILED();
puts(" Hard link failed for hidden object.");
@@ -490,7 +490,7 @@ test_assoc(hid_t fapl)
FAIL_STACK_ERROR
/* Get information about the root of file2 */
- if(H5Oget_info(file2, &oi1) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info2(file2, &oi1, 0) < 0) FAIL_STACK_ERROR
/* Create the virtual file */
if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
@@ -499,7 +499,7 @@ test_assoc(hid_t fapl)
* Get info about the mount point -- should be the same as the root group
* of file2.
*/
- if(H5Oget_info_by_name(file1, "/mnt1", &oi2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "/mnt1", &oi2, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(oi1.fileno != oi2.fileno || H5F_addr_ne(oi1.addr, oi2.addr)) {
H5_FAILED();
@@ -688,7 +688,7 @@ test_preopen(hid_t fapl)
if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Now access the thing we previously opened */
- if(H5Oget_info(grp, &oinfo) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info2(grp, &oinfo, 0) < 0) FAIL_STACK_ERROR
/* Shut down */
if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR
@@ -752,10 +752,10 @@ test_postopen(hid_t fapl)
if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR
/* Now access the thing we previously opened */
- if(H5Oget_info(grp, &oinfo) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info2(grp, &oinfo, 0) < 0) FAIL_STACK_ERROR
/* Try accessing it from the file */
- if(H5Oget_info_by_name(file2, "/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file2, "/file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Shut down */
if(H5Gclose(grp) < 0) FAIL_STACK_ERROR
@@ -825,12 +825,12 @@ test_unlink(hid_t fapl)
* before the H5Fmount() and thus refers to the mount point itself rather
* than the group mounted there.
*/
- if(H5Oget_info_by_name(file1, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
- if(H5Oget_info_by_name(mnt, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
- if(H5Oget_info_by_name(root, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
- if(H5Oget_info_by_name(root, "file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "/mnt_unlink/file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(mnt, "/mnt_unlink/file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(root, "/mnt_unlink/file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(root, "file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
H5E_BEGIN_TRY {
- status = H5Oget_info_by_name(mnt, "file2", &oinfo, H5P_DEFAULT);
+ status = H5Oget_info_by_name2(mnt, "file2", &oinfo, 0, H5P_DEFAULT);
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
@@ -845,9 +845,9 @@ test_unlink(hid_t fapl)
* We should still be able to get to "/file2" of file2 by starting at
* `root' which is still open, but not by name.
*/
- if(H5Oget_info_by_name(root, "file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(root, "file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
H5E_BEGIN_TRY {
- status = H5Oget_info_by_name(mnt, "file2", &oinfo, H5P_DEFAULT);
+ status = H5Oget_info_by_name2(mnt, "file2", &oinfo, 0, H5P_DEFAULT);
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
@@ -855,7 +855,7 @@ test_unlink(hid_t fapl)
TEST_ERROR
} /* end if */
H5E_BEGIN_TRY {
- status = H5Oget_info_by_name(file2, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT);
+ status = H5Oget_info_by_name2(file2, "/mnt_unlink/file2", &oinfo, 0, H5P_DEFAULT);
} H5E_END_TRY;
if(status >= 0) {
H5_FAILED();
@@ -943,7 +943,7 @@ test_mvmpt(hid_t fapl)
if(H5Lmove(file1, "/mnt_move_a", H5L_SAME_LOC, "/mnt_move_b", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Access something under the new name */
- if(H5Oget_info_by_name(file1, "/mnt_move_b/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "/mnt_move_b/file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Shut down */
if(H5Funmount(file1, "/mnt_move_b") < 0) FAIL_STACK_ERROR
@@ -1102,18 +1102,18 @@ test_uniformity(hid_t fapl)
if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Access some things from the file1 handle */
- if(H5Oget_info_by_name(file1, "/", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
- if(H5Oget_info_by_name(file1, "/mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
- if(H5Oget_info_by_name(file1, "mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
- if(H5Oget_info_by_name(file1, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
- if(H5Oget_info_by_name(file1, "mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "/", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "/mnt1", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "mnt1", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "/mnt1/file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "mnt1/file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Access the same things from the file2 handle */
- if(H5Oget_info_by_name(file2, "/", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
- if(H5Oget_info_by_name(file2, "/mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
- if(H5Oget_info_by_name(file2, "mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
- if(H5Oget_info_by_name(file2, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
- if(H5Oget_info_by_name(file2, "mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file2, "/", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file2, "/mnt1", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file2, "mnt1", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file2, "/mnt1/file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file2, "mnt1/file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Shut down */
if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR
@@ -1170,7 +1170,7 @@ test_close(hid_t fapl)
* still accessible through the file2 handle.
*/
if(H5Fclose(file1) < 0) FAIL_STACK_ERROR
- if(H5Oget_info_by_name(file2, "/mnt1", &oinfo, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(file2, "/mnt1", &oinfo, 0, H5P_DEFAULT) < 0) {
H5_FAILED();
puts(" File1 contents are not accessible!");
TEST_ERROR
@@ -1191,7 +1191,7 @@ test_close(hid_t fapl)
* Close file2. It is not actually closed because it's a child of file1.
*/
if(H5Fclose(file2) < 0) FAIL_STACK_ERROR
- if(H5Oget_info_by_name(file1, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "/mnt1/file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(H5Fclose(file1) < 0) FAIL_STACK_ERROR
/* Check that all file IDs have been closed */
@@ -2495,9 +2495,9 @@ test_fcdegree_strong(hid_t fapl)
TEST_ERROR
/* Check that objects are still open */
- if(H5Oget_info(gidA, &oinfo) < 0)
+ if(H5Oget_info2(gidA, &oinfo, 0) < 0)
TEST_ERROR
- if(H5Oget_info(gidAM, &oinfo) < 0)
+ if(H5Oget_info2(gidAM, &oinfo, 0) < 0)
TEST_ERROR
/* Close file #2 (should close open objects also) */
@@ -2506,12 +2506,12 @@ test_fcdegree_strong(hid_t fapl)
/* Check that objects are closed */
H5E_BEGIN_TRY {
- ret = H5Oget_info(gidA, &oinfo);
+ ret = H5Oget_info2(gidA, &oinfo, 0);
} H5E_END_TRY;
if(ret >= 0)
TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5Oget_info(gidAM, &oinfo);
+ ret = H5Oget_info2(gidAM, &oinfo, 0);
} H5E_END_TRY;
if(ret >= 0)
TEST_ERROR
diff --git a/test/mtime.c b/test/mtime.c
index 38e3960..59457d4 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -90,9 +90,9 @@ main(void)
*/
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR;
- if(H5Oget_info_by_name(file, "dset", &oi1, H5P_DEFAULT) < 0) TEST_ERROR;
+ if(H5Oget_info_by_name2(file, "dset", &oi1, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR;
if((dset = H5Dopen2(file, "dset", H5P_DEFAULT)) < 0) TEST_ERROR;
- if(H5Oget_info(dset, &oi2) < 0) TEST_ERROR;
+ if(H5Oget_info2(dset, &oi2, H5O_INFO_TIME) < 0) TEST_ERROR;
if(H5Dclose(dset) < 0) TEST_ERROR;
if(H5Fclose(file) < 0) TEST_ERROR;
@@ -134,7 +134,7 @@ main(void)
file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
if(file >= 0){
- if(H5Oget_info_by_name(file, "/Dataset1", &oi1, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(file, "/Dataset1", &oi1, H5O_INFO_TIME, H5P_DEFAULT) < 0)
TEST_ERROR;
if(oi1.ctime != MTIME1) {
H5_FAILED();
@@ -164,7 +164,7 @@ main(void)
file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
if(file >= 0){
- if(H5Oget_info_by_name(file, "/Dataset1", &oi2, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(file, "/Dataset1", &oi2, H5O_INFO_TIME, H5P_DEFAULT) < 0)
TEST_ERROR;
if(oi2.ctime != MTIME2) {
H5_FAILED();
diff --git a/test/objcopy.c b/test/objcopy.c
index 3fbb7b8..7e57a56 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -877,10 +877,10 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
cpy_flags = 0;
/* Check the number of attributes on source dataset */
- if(H5Oget_info(oid, &oinfo1) < 0) TEST_ERROR
+ if(H5Oget_info2(oid, &oinfo1, H5O_INFO_NUM_ATTRS) < 0) TEST_ERROR
/* Check the number of attributes on destination dataset */
- if(H5Oget_info(oid2, &oinfo2) < 0) TEST_ERROR
+ if(H5Oget_info2(oid2, &oinfo2, H5O_INFO_NUM_ATTRS) < 0) TEST_ERROR
if(cpy_flags & H5O_COPY_WITHOUT_ATTR_FLAG) {
/* Check that the destination has no attributes */
@@ -1071,8 +1071,8 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
if(obj_owner > 0) {
H5O_info_t oinfo1, oinfo2;
- if(H5Oget_info(obj_owner, &oinfo1) < 0) TEST_ERROR
- if(H5Oget_info(obj1_id, &oinfo2) < 0) TEST_ERROR
+ if(H5Oget_info2(obj_owner, &oinfo1, 0) < 0) TEST_ERROR
+ if(H5Oget_info2(obj1_id, &oinfo2, 0) < 0) TEST_ERROR
if(H5F_addr_eq(oinfo1.addr, oinfo2.addr)) {
if(H5Oclose(obj1_id) < 0) TEST_ERROR
if(H5Oclose(obj2_id) < 0) TEST_ERROR
@@ -1129,8 +1129,8 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
if(obj_owner > 0) {
H5O_info_t oinfo1, oinfo2;
- if(H5Oget_info(obj_owner, &oinfo1) < 0) TEST_ERROR
- if(H5Oget_info(obj1_id, &oinfo2) < 0) TEST_ERROR
+ if(H5Oget_info2(obj_owner, &oinfo1, 0) < 0) TEST_ERROR
+ if(H5Oget_info2(obj1_id, &oinfo2, 0) < 0) TEST_ERROR
if(H5F_addr_eq(oinfo1.addr, oinfo2.addr)) {
if(H5Oclose(obj1_id) < 0) TEST_ERROR
if(H5Oclose(obj2_id) < 0) TEST_ERROR
@@ -1423,8 +1423,8 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
H5O_info_t oinfo, oinfo2; /* Object info */
/* Compare some pieces of the object info */
- if(H5Oget_info_by_name(gid, objname, &oinfo, H5P_DEFAULT) < 0) TEST_ERROR
- if(H5Oget_info_by_name(gid2, objname2, &oinfo2, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(gid, objname, &oinfo, H5O_INFO_HDR, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(gid2, objname2, &oinfo2, H5O_INFO_HDR, H5P_DEFAULT) < 0) TEST_ERROR
if(oinfo.type != oinfo2.type) TEST_ERROR
if(oinfo.rc != oinfo2.rc) TEST_ERROR
@@ -1949,8 +1949,8 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
if(H5Tcommitted(tid) != TRUE) TEST_ERROR
/* verify that the addresses of the datatypes are the same */
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
- if(H5Oget_info(tid2, &oinfo2) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
+ if(H5Oget_info2(tid2, &oinfo2, 0) < 0) TEST_ERROR
if(oinfo.fileno != oinfo2.fileno || oinfo.addr != oinfo2.addr)
FAIL_PUTS_ERROR("destination attribute does not use the same committed datatype")
@@ -10331,28 +10331,28 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* Open SRC1 committed dtype, get address */
if((tid = H5Topen2(fid_dst, NAME_GROUP_TOP "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* Open SRC1 dset dtype, check address */
if((did = H5Dopen2(fid_dst, NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
/* Open SRC2 committed dtype, check address */
if((tid = H5Topen2(fid_dst, NAME_GROUP_TOP2 "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
/* Open SRC2 dset dtype, check address */
if((did = H5Dopen2(fid_dst, NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -10385,7 +10385,7 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* Open SRC1 dset dtype, get address */
if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -10393,7 +10393,7 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* Open SRC2 dset dtype, check address */
if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -10565,28 +10565,28 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo
/* Open group 1 source committed dtype, get address */
if((tid = H5Topen2(fid, NAME_GROUP_TOP "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* Open group 1 source dset dtype, check address */
if((did = H5Dopen2(fid, NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
/* Open group 1 committed dtype, check address */
if((tid = H5Topen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
/* Open group 1 dset dtype, check address */
if((did = H5Dopen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -10594,7 +10594,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo
/* Open group 2 source committed dtype, get address and make sure it is
* different from group 1 source committed dtype */
if((tid = H5Topen2(fid, NAME_GROUP_TOP2 "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr == exp_addr) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -10602,21 +10602,21 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo
/* Open group 2 source dset dtype, check address */
if((did = H5Dopen2(fid, NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
/* Open group 2 committed dtype, check address */
if((tid = H5Topen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP2 "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
/* Open group 2 dset dtype, check address */
if((did = H5Dopen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -10644,7 +10644,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo
/* Open group 1 source dset dtype, get address */
if((did = H5Dopen2(fid, NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -10652,7 +10652,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo
/* Open group 1 dset dtype, check address */
if((did = H5Dopen2(fid, NAME_GROUP_TOP4 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -10661,7 +10661,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo
* different from group 1 source dset dtype */
if((did = H5Dopen2(fid, NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr == exp_addr) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -10670,7 +10670,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo
/* Open group 2 dset dtype, check address */
if((did = H5Dopen2(fid, NAME_GROUP_TOP4 "/" NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -10837,14 +10837,14 @@ test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
/* Open committed dtype "b", get address */
if((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* Open dset dtype, check address */
if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -10875,28 +10875,28 @@ test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
/* Open committed dtype "a", get address */
if((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* Open dset 2 dtype, check address */
if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
/* Open committed dtype "b", get address */
if((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* Open dset dtype, check address */
if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -11072,7 +11072,7 @@ test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
/* Open attribute dtype, get address */
if((aid = H5Aopen_by_name(fid_dst, NAME_GROUP_TOP, "attr", H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Aget_type(aid)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Aclose(aid) < 0) TEST_ERROR
@@ -11080,7 +11080,7 @@ test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
/* Open dset dtype, check address */
if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -11331,13 +11331,13 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
/* get address of committed datatype at root group */
if((tid = H5Topen2(fid_dst, SRC_ROOT_GROUP "/" ROOT_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr_int = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* get address of committed datatype at /g0 */
if((tid = H5Topen2(fid_dst, SRC_ROOT_GROUP NAME_GROUP_TOP "/" GROUP_NDT_SHORT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr_short = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -11351,7 +11351,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
/* check address of datatype for second dataset */
if((did = H5Dopen2(fid_dst, SRC_ROOT_GROUP NAME_GROUP_TOP "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr_short) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -11359,7 +11359,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
/* check address of datatype for third dataset */
if((did = H5Dopen2(fid_dst, SRC_ROOT_GROUP NAME_GROUP_TOP "/" SRC_NDT_DSET3, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr_int) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -11371,7 +11371,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
/* get address of committed datatype at /g0 */
if((tid = H5Topen2(fid_dst, NAME_GROUP_TOP "/" GROUP_NDT_SHORT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr_short) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -11385,7 +11385,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
/* check address of datatype for second dataset */
if((did = H5Dopen2(fid_dst, NAME_GROUP_TOP "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr_short) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -11393,7 +11393,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
/* check address of datatype for third dataset */
if((did = H5Dopen2(fid_dst, NAME_GROUP_TOP "/" SRC_NDT_DSET3, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr_int) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -11408,7 +11408,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
/* Open attribute with anon ndt (short), get address */
if((aid = H5Aopen_by_name(fid_dst, NAME_GROUP_UNCOPIED, DST_ATTR_ANON_SHORT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Aget_type(aid)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr_short) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Aclose(aid) < 0) TEST_ERROR
@@ -11416,7 +11416,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
/* Open attribute with anon ndt (int), get address */
if((aid = H5Aopen_by_name(fid_dst, NAME_GROUP_UNCOPIED, DST_ATTR_ANON_INT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Aget_type(aid)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr_int) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Aclose(aid) < 0) TEST_ERROR
@@ -11431,7 +11431,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
/* check address of datatype for second dataset */
if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr_short) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -11439,7 +11439,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
/* check address of datatype for third dataset */
if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET3, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr_int) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -11642,50 +11642,50 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
*/
/* get address of committed datatype: /src_root/src_ndt_double */
if((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_DOUBLE, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* get address of committed datatype: /dst_ndt_double */
if((tid = H5Topen2(fid_dst, "/" DST_NDT_DOUBLE, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
/* get address of committed datatype: /src_root/src_ndt_float */
if((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_FLOAT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* get address of committed datatype: /dst_ndt_float */
if((tid = H5Topen2(fid_dst, "/" DST_NDT_FLOAT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
/* get address of committed datatype: /src_root/src_ndt_int */
if((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* get address of committed datatype: /dst_ndt_int */
if((tid = H5Topen2(fid_dst, "/" DST_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
/* get address of committed datatype: /src_root/src_ndt_short */
if((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_SHORT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* open attribute; get its dtype; get dtype's address: /src_root/src_ndt_double/dst_attr */
if((aid = H5Aopen_by_name(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_DOUBLE, DST_ATTR, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Aget_type(aid)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Aclose(aid) < 0) TEST_ERROR
@@ -11816,13 +11816,13 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* open committed dtype "/dst_ndt_int", get its address */
if((tid = H5Topen2(fid_dst, DST_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* check address of "/uncopied/src_ndt_int" */
if((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -11849,13 +11849,13 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* open committed dtype "/uncopied/src_ndt_int", get its address */
if((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* check address of "/src_ndt_int" */
if((tid = H5Topen2(fid_dst, SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -11887,13 +11887,13 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Open committed dtype "/uncopied/src_ndt_int", get its address */
if((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* check address of "/src_ndt_int2" */
if((tid = H5Topen2(fid_dst, SRC_NDT_INT2, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -11921,13 +11921,13 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Open committed dtype "/dst_dt_int", get its address */
if((tid = H5Topen2(fid_dst, DST_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* check address of "/uncopied/src_ndt_int2" */
if((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT2, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -12077,14 +12077,14 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Open committed dtype "/dst_ndt_int", get its address */
if((tid = H5Topen2(fid_dst, DST_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* check address of datatype for the copied dataset: "/uncopied/src_ndt_dset" */
if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -12113,7 +12113,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Open committed dtype dataset "/uncopied/src_ndt_dset", get its datatype address */
if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -12121,7 +12121,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* check address of datatype for the copied dataset: "/src_ndt_dset" */
if((did = H5Dopen2(fid_dst, SRC_NDT_DSET, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -12155,7 +12155,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* open the copied dataset: /uncopied/src_ndt_dset", get its address */
if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -12163,7 +12163,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* check address of datatype for the copied dataset: "/src_ndt_dset2" */
if((did = H5Dopen2(fid_dst, SRC_NDT_DSET2, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -12193,7 +12193,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* open the copied dataset: "/src_ndt_dset", get its datatype address */
if((did = H5Dopen2(fid_dst, SRC_NDT_DSET, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -12201,7 +12201,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* check address of datatype for the copied dataset: /uncopied/src_ndt_dset2 */
if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -12861,14 +12861,14 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Open committed dtype "b", get address */
if((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* Open dset dtype, check address */
if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -12909,14 +12909,14 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Open committed dtype "a", get address */
if((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* Open copied dataset and its dtype, check address */
if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr != exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -12948,28 +12948,28 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Open committed dtype "a", get address */
if((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* Open the copied dataset and get its dtype, addresses should not be equal */
if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr == exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
/* Open committed dtype "b", get address */
if((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* Open the copied dataset and get its dtype, addresses should not be equal */
if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr == exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -13008,28 +13008,28 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Open committed dtype "a", get address */
if((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* Open the copied dataset and get its dtype, addresses should not be equal */
if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr == exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
/* Open committed dtype "b", get address */
if((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
exp_addr = oinfo.addr;
if(H5Tclose(tid) < 0) TEST_ERROR
/* Open the copied dataset and get its dtype, addresses should not be equal */
if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) TEST_ERROR
if((tid = H5Dget_type(did)) < 0) TEST_ERROR
- if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(tid, &oinfo, 0) < 0) TEST_ERROR
if(oinfo.addr == exp_addr) TEST_ERROR
if(H5Tclose(tid) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
diff --git a/test/ohdr.c b/test/ohdr.c
index e91c6a8..146245f 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -383,7 +383,7 @@ test_ohdr_swmr(hbool_t new_format)
FAIL_STACK_ERROR
/* Get the object information */
- if(H5Oget_info(did, &obj_info) < 0)
+ if(H5Oget_info2(did, &obj_info, H5O_INFO_HDR) < 0)
FAIL_STACK_ERROR
if(new_format)
diff --git a/test/stab.c b/test/stab.c
index 331c68d..37097b7 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -419,7 +419,7 @@ lifecycle(hid_t fcpl, hid_t fapl2)
if(H5G__is_new_dense_test(gid) != FALSE) TEST_ERROR
/* Check that the object header is only one chunk and the space has been allocated correctly */
- if(H5Oget_info(gid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(gid, &oinfo, H5O_INFO_HDR) < 0) TEST_ERROR
if(oinfo.hdr.space.total != 151) TEST_ERROR
if(oinfo.hdr.space.free != 0) TEST_ERROR
if(oinfo.hdr.nmesgs != 6) TEST_ERROR
@@ -441,7 +441,7 @@ lifecycle(hid_t fcpl, hid_t fapl2)
if(H5G__is_new_dense_test(gid) != TRUE) TEST_ERROR
/* Check that the object header is still one chunk and the space has been allocated correctly */
- if(H5Oget_info(gid, &oinfo) < 0) TEST_ERROR
+ if(H5Oget_info2(gid, &oinfo, H5O_INFO_HDR) < 0) TEST_ERROR
if(oinfo.hdr.space.total != 151) TEST_ERROR
if(oinfo.hdr.space.free != 92) TEST_ERROR
if(oinfo.hdr.nmesgs != 3) TEST_ERROR
diff --git a/test/tattr.c b/test/tattr.c
index b5495de..f312870 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -422,7 +422,7 @@ test_attr_basic_read(hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Verify the correct number of attributes */
- ret = H5Oget_info(dataset, &oinfo);
+ ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.num_attrs, 2, "H5Oget_info");
@@ -451,7 +451,7 @@ test_attr_basic_read(hid_t fapl)
CHECK(group, FAIL, "H5Gopen2");
/* Verify the correct number of attributes */
- ret = H5Oget_info(group, &oinfo);
+ ret = H5Oget_info2(group, &oinfo, H5O_INFO_NUM_ATTRS);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.num_attrs, 1, "H5Oget_info");
@@ -793,7 +793,7 @@ test_attr_compound_read(hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Verify the correct number of attributes */
- ret = H5Oget_info(dataset, &oinfo);
+ ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.num_attrs, 1, "H5Oget_info");
@@ -997,7 +997,7 @@ test_attr_scalar_read(hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Verify the correct number of attributes */
- ret = H5Oget_info(dataset, &oinfo);
+ ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.num_attrs, 1, "H5Oget_info");
@@ -1200,7 +1200,7 @@ test_attr_mult_read(hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Verify the correct number of attributes */
- ret = H5Oget_info(dataset, &oinfo);
+ ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.num_attrs, 3, "H5Oget_info");
@@ -1457,7 +1457,7 @@ test_attr_iterate(hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Verify the correct number of attributes */
- ret = H5Oget_info(dataset, &oinfo);
+ ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.num_attrs, 0, "H5Oget_info");
@@ -1475,7 +1475,7 @@ test_attr_iterate(hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Verify the correct number of attributes */
- ret = H5Oget_info(dataset, &oinfo);
+ ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.num_attrs, 3, "H5Oget_info");
@@ -1522,7 +1522,7 @@ test_attr_delete(hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Verify the correct number of attributes */
- ret = H5Oget_info(dataset, &oinfo);
+ ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.num_attrs, 3, "H5Oget_info");
@@ -1531,7 +1531,7 @@ test_attr_delete(hid_t fapl)
VERIFY(ret, FAIL, "H5Adelete");
/* Verify the correct number of attributes */
- ret = H5Oget_info(dataset, &oinfo);
+ ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.num_attrs, 3, "H5Oget_info");
@@ -1540,7 +1540,7 @@ test_attr_delete(hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Verify the correct number of attributes */
- ret = H5Oget_info(dataset, &oinfo);
+ ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.num_attrs, 2, "H5Oget_info");
@@ -1577,7 +1577,7 @@ test_attr_delete(hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Verify the correct number of attributes */
- ret = H5Oget_info(dataset, &oinfo);
+ ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.num_attrs, 1, "H5Oget_info");
@@ -1600,7 +1600,7 @@ test_attr_delete(hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Verify the correct number of attributes */
- ret = H5Oget_info(dataset, &oinfo);
+ ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.num_attrs, 0, "H5Oget_info");
@@ -1665,7 +1665,7 @@ test_attr_dtype_shared(hid_t fapl)
CHECK(ret, FAIL, "H5Tcommit2");
/* Check reference count on named datatype */
- ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 1, "H5Oget_info_by_name");
@@ -1678,7 +1678,7 @@ test_attr_dtype_shared(hid_t fapl)
CHECK(dset_id, FAIL, "H5Dcreate2");
/* Check reference count on named datatype */
- ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 2, "H5Oget_info_by_name");
@@ -1687,7 +1687,7 @@ test_attr_dtype_shared(hid_t fapl)
CHECK(attr_id, FAIL, "H5Acreate2");
/* Check reference count on named datatype */
- ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 3, "H5Oget_info_by_name");
@@ -1700,7 +1700,7 @@ test_attr_dtype_shared(hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Check reference count on named datatype */
- ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 2, "H5Oget_info_by_name");
@@ -1709,7 +1709,7 @@ test_attr_dtype_shared(hid_t fapl)
CHECK(attr_id, FAIL, "H5Acreate2");
/* Check reference count on named datatype */
- ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 3, "H5Oget_info_by_name");
@@ -1764,7 +1764,7 @@ test_attr_dtype_shared(hid_t fapl)
CHECK(ret, FAIL, "H5Dclose");
/* Check reference count on named datatype */
- ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 3, "H5Oget_info_by_name");
@@ -1773,7 +1773,7 @@ test_attr_dtype_shared(hid_t fapl)
CHECK(ret, FAIL, "H5Ldelete");
/* Check reference count on named datatype */
- ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 1, "H5Oget_info_by_name");
@@ -2464,7 +2464,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check # of attributes */
- ret = H5Oget_info(dataset, &oinfo);
+ ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info");
} /* end for */
@@ -2646,7 +2646,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Arename_by_name");
/* Check # of attributes */
- ret = H5Oget_info(dataset, &oinfo);
+ ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info");
} /* end for */
@@ -2798,7 +2798,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check # of attributes */
- ret = H5Oget_info(dataset, &oinfo);
+ ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info");
} /* end for */
@@ -10484,7 +10484,7 @@ test_attr_bug8(hid_t fcpl, hid_t fapl)
CHECK(gid, FAIL, "H5Gcreate2");
/* Get root group address */
- ret = H5Oget_info(fid, &oinfo);
+ ret = H5Oget_info2(fid, &oinfo, 0);
CHECK(ret, FAIL, "H5Oget_info");
root_addr = oinfo.addr;
@@ -10509,7 +10509,7 @@ test_attr_bug8(hid_t fcpl, hid_t fapl)
CHECK(gid, FAIL, "H5Gopen2");
oid = H5Oopen(gid, LINK1_NAME, H5P_DEFAULT);
CHECK(oid, FAIL, "H5Oopen");
- ret = H5Oget_info(oid, &oinfo);
+ ret = H5Oget_info2(oid, &oinfo, 0);
CHECK(ret, FAIL, "H5Oget_info");
if(oinfo.addr != root_addr)
TestErrPrintf("incorrect link target address: addr: %llu, expected: %llu\n", (long long unsigned)oinfo.addr, (long long unsigned)root_addr);
@@ -10554,7 +10554,7 @@ test_attr_bug8(hid_t fcpl, hid_t fapl)
CHECK(gid, FAIL, "H5Gopen2");
oid = H5Oopen(gid, LINK1_NAME, H5P_DEFAULT);
CHECK(oid, FAIL, "H5Oopen");
- ret = H5Oget_info(oid, &oinfo);
+ ret = H5Oget_info2(oid, &oinfo, 0);
CHECK(ret, FAIL, "H5Oget_info");
if(oinfo.addr != root_addr)
TestErrPrintf("incorrect link target address: addr: %llu, expected: %llu\n", (long long unsigned)oinfo.addr, (long long unsigned)root_addr);
diff --git a/test/tfile.c b/test/tfile.c
index 677fd06..d3134f8 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -4891,7 +4891,7 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create,
/*
* Make sure the root group has the correct object header version
*/
- ret = H5Oget_info_by_name(file, "/", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(file, "/", &oinfo, H5O_INFO_HDR, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.hdr.version, oh_vers_create, "H5Oget_info_by_name");
@@ -4907,7 +4907,7 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create,
file = H5Fopen("tfile5.h5", H5F_ACC_RDWR, fapl);
CHECK(file, FAIL, "H5Fopen");
- ret = H5Oget_info_by_name(file, "/", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(file, "/", &oinfo, H5O_INFO_HDR, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.hdr.version, oh_vers_create, "H5Oget_info_by_name");
@@ -4918,7 +4918,7 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create,
group = H5Gcreate2(file, "/G1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(group, FAIL, "H5Gcreate");
- ret = H5Oget_info(group, &oinfo);
+ ret = H5Oget_info2(group, &oinfo, H5O_INFO_HDR);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo.hdr.version, oh_vers_mod, "H5Oget_info");
@@ -4932,7 +4932,7 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create,
group = H5Gcreate2(file, "/G1/G3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(group, FAIL, "H5Gcreate");
- ret = H5Oget_info(group, &oinfo);
+ ret = H5Oget_info2(group, &oinfo, H5O_INFO_HDR);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.hdr.version, oh_vers_mod, "H5Oget_info_by_name");
@@ -4942,7 +4942,7 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create,
/*
* Make sure the root group still has the correct object header version
*/
- ret = H5Oget_info_by_name(file, "/", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(file, "/", &oinfo, H5O_INFO_HDR, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.hdr.version, oh_vers_create, "H5Oget_info_by_name");
@@ -5640,7 +5640,7 @@ test_libver_bounds_obj(hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Get root group's object info */
- ret = H5Oget_info_by_name(fid, "/", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "/", &oinfo, H5O_INFO_HDR, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
/* Verify object header version is 2 because shared message is enabled */
@@ -5659,7 +5659,7 @@ test_libver_bounds_obj(hid_t fapl)
CHECK(fid, FAIL, "H5Fcreate");
/* Get root group's object info */
- ret = H5Oget_info_by_name(fid, "/", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "/", &oinfo, H5O_INFO_HDR, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
/* Verify object header version is as indicated by low_bound */
@@ -5714,7 +5714,7 @@ test_libver_bounds_obj(hid_t fapl)
VERIFY(ginfo.storage_type, H5G_STORAGE_TYPE_SYMBOL_TABLE, "H5Gget_info");
/* Get object header information */
- ret = H5Oget_info_by_name(gid, GRP_NAME, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(gid, GRP_NAME, &oinfo, H5O_INFO_HDR, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
/* Verify object header version as indicated by low_bound */
diff --git a/test/th5o.c b/test/th5o.c
index 00d706c..76ea3b1 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -30,6 +30,11 @@
#define TEST6_DIM1 100
#define TEST6_DIM2 100
+//#define NUM_GROUPS 100000
+#define NUM_GROUPS 100
+#define NUM_ATTRS 10
+#define NUM_DSETS 50
+
/****************************************************************
**
@@ -410,13 +415,13 @@ test_h5o_refcount(void)
CHECK(ret, FAIL, "H5Sclose");
/* Get ref counts for each object. They should all be 1, since each object has a hard link. */
- ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "group", &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
- ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
- ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
@@ -429,13 +434,13 @@ test_h5o_refcount(void)
CHECK(ret, FAIL, "H5Oincr_refcount");
/* Get ref counts for each object. They should all be 2 now. */
- ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "group", &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name");
- ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name");
- ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name");
@@ -447,13 +452,13 @@ test_h5o_refcount(void)
ret = H5Odecr_refcount(dset);
CHECK(ret, FAIL, "H5Odecr_refcount");
- ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "group", &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
- ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
- ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
@@ -485,13 +490,13 @@ test_h5o_refcount(void)
dset = H5Dopen2(fid, "dataset", H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dopen2");
- ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "group", &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name");
- ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name");
- ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name");
@@ -523,13 +528,13 @@ test_h5o_refcount(void)
dset = H5Dopen2(fid, "dataset", H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dopen2");
- ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "group", &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
- ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
- ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
@@ -1272,9 +1277,9 @@ test_h5o_getinfo_same_file(void)
HDmemset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for each object, through group IDs */
- ret = H5Oget_info(gid1, &oinfo1);
+ ret = H5Oget_info2(gid1, &oinfo1, 0);
CHECK(ret, FAIL, "H5Oget_info");
- ret = H5Oget_info(gid2, &oinfo2);
+ ret = H5Oget_info2(gid2, &oinfo2, 0);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info");
@@ -1284,9 +1289,9 @@ test_h5o_getinfo_same_file(void)
HDmemset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for each object, by name */
- ret = H5Oget_info_by_name(fid1, "group1", &oinfo1, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid1, "group1", &oinfo1, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
- ret = H5Oget_info_by_name(fid1, "group2", &oinfo2, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid1, "group2", &oinfo2, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info");
@@ -1317,9 +1322,9 @@ test_h5o_getinfo_same_file(void)
HDmemset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for each object, through group IDs */
- ret = H5Oget_info(gid1, &oinfo1);
+ ret = H5Oget_info2(gid1, &oinfo1, 0);
CHECK(ret, FAIL, "H5Oget_info");
- ret = H5Oget_info(gid2, &oinfo2);
+ ret = H5Oget_info2(gid2, &oinfo2, 0);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info");
@@ -1329,9 +1334,9 @@ test_h5o_getinfo_same_file(void)
HDmemset(&oinfo2, 0, sizeof(oinfo2));
/* Query the object info for each object, by name */
- ret = H5Oget_info_by_name(fid1, "group1", &oinfo1, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid1, "group1", &oinfo1, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
- ret = H5Oget_info_by_name(fid1, "group2", &oinfo2, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid1, "group2", &oinfo2, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info");
@@ -1348,6 +1353,331 @@ test_h5o_getinfo_same_file(void)
} /* test_h5o_getinfo_same_file() */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+/****************************************************************
+**
+** visit_obj_cb():
+** This is the callback function invoked by H5Ovisit1() in
+** test_h5o_getinfo_visit():
+** --Verify that the object info returned to the callback
+** function is the same as H5Oget_info2().
+**
+****************************************************************/
+static int
+visit_obj_cb(hid_t group_id, const char *name, const H5O_info_t *oinfo1,
+ void H5_ATTR_UNUSED *_op_data)
+{
+ H5O_info_t oinfo2; /* Object info structs */
+
+ /* Verify the object info for "group1", "group2" and the root group */
+ if(!(HDstrcmp(name, "group1"))) {
+ H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_NUM_ATTRS, H5P_DEFAULT);
+ VERIFY(oinfo1->num_attrs, oinfo2.num_attrs, "obj info from H5Ovisit1");
+ } else if(!(HDstrcmp(name, "group2"))) {
+ H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_HDR, H5P_DEFAULT);
+ VERIFY(oinfo1->hdr.nmesgs, oinfo2.hdr.nmesgs, "obj info from H5Ovisit1/H5Oget_info2");
+ VERIFY(oinfo1->hdr.nchunks, oinfo2.hdr.nchunks, "obj info from H5Ovisit1/H5Oget_info2");
+ } else if(!(HDstrcmp(name, "."))) {
+ H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_META_SIZE, H5P_DEFAULT);
+ VERIFY(oinfo1->meta_size.obj.index_size, oinfo2.meta_size.obj.index_size, "obj info from H5Ovisit1/H5Oget_info2");
+ VERIFY(oinfo1->meta_size.obj.heap_size, oinfo2.meta_size.obj.heap_size, "obj info from H5Ovisit1/H5Oget_info2");
+ }
+
+ return(H5_ITER_CONT);
+} /* end visit_obj_cb() */
+
+
+/****************************************************************
+**
+** test_h5o_getinfo_visit():
+** Verify that the object info returned via H5Oget_info1()
+** and H5Oget_info2() are the same.
+** Verify that the object info retrieved via H5Ovisit1() is
+** the same as H5Oget_info2().
+**
+****************************************************************/
+static void
+test_h5o_getinfo_visit(void)
+{
+ hid_t fid = -1; /* HDF5 File ID */
+ hid_t gid1 = -1, gid2 = -1; /* Group IDs */
+ hid_t sid = -1; /* Dataspace ID */
+ hid_t aid = -1; /* Attribute ID */
+ H5O_info_t oinfo1, oinfo2; /* Object info structs */
+ char attrname[25]; /* Attribute name */
+ int j; /* Local index variable */
+ herr_t ret; /* Value returned from API calls */
+
+ /* Create an HDF5 file */
+ fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Create "group1" in the file */
+ gid1 = H5Gcreate2(fid, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid1, FAIL, "H5Gcreate2");
+
+ /* Create dataspace */
+ sid = H5Screate(H5S_SCALAR);
+ CHECK(sid, FAIL, "H5Screate");
+
+ /* Attach 10 attributes to "group1" */
+ for(j = 0; j <10; j++) {
+ /* Create the attribute name */
+ sprintf(attrname, "attr%u", j);
+ /* Create the attribute */
+ aid = H5Acreate2(gid1, attrname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
+ /* Close the attribute */
+ ret = H5Aclose(aid);
+ CHECK(ret, FAIL, "H5Aclose");
+ }
+
+ /* Create "group2" in the file */
+ gid2 = H5Gcreate2(fid, "group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid2, FAIL, "H5Gcreate2");
+
+ /* Reset object info */
+ HDmemset(&oinfo1, 0, sizeof(oinfo1));
+ HDmemset(&oinfo2, 0, sizeof(oinfo2));
+
+ /* Query the object info for "group1" via H5Oget_info1 and H5Oget_info2 */
+ ret = H5Oget_info1(gid1, &oinfo1);
+ CHECK(ret, FAIL, "H5Oget_info");
+ ret = H5Oget_info2(gid1, &oinfo2, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info");
+
+ /* Verify the object info for "group1" is correct */
+ VERIFY(oinfo1.fileno, oinfo2.fileno, "obj info from H5Oget_info1/2");
+ VERIFY(oinfo1.num_attrs, oinfo2.num_attrs, "obj info from H5Oget_info1/2");
+
+ /* Reset object info */
+ HDmemset(&oinfo1, 0, sizeof(oinfo1));
+ HDmemset(&oinfo2, 0, sizeof(oinfo2));
+
+ /* Query the object info for "group2" via H5Oget_info1 and H5Oget_info2 */
+ ret = H5Oget_info_by_name1(fid, "group2", &oinfo1, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Oget_info_by_name");
+ ret = H5Oget_info_by_name2(fid, "group2", &oinfo2, H5O_INFO_HDR|H5O_INFO_META_SIZE, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Oget_info_by_name");
+
+ /* Verify the object info for "group2" is correct */
+ VERIFY(oinfo1.hdr.nmesgs, oinfo2.hdr.nmesgs, "obj info from H5Oget_info1/2");
+ VERIFY(oinfo1.hdr.nchunks, oinfo2.hdr.nchunks, "obj info from H5Oget_info1/2");
+ VERIFY(oinfo1.meta_size.obj.index_size, oinfo2.meta_size.obj.index_size, "obj info from H5Oget_info1/2");
+ VERIFY(oinfo1.meta_size.obj.heap_size, oinfo2.meta_size.obj.heap_size, "obj info from H5Oget_info1/2");
+
+ /* Close everything */
+ ret = H5Gclose(gid1);
+ CHECK(ret, FAIL, "H5Gclose");
+ ret = H5Gclose(gid2);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ /* Verify the object info returned to the callback function is correct */
+ ret = H5Ovisit1(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, NULL);
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+} /* test_h5o_getinfo_visit() */
+
+
+/****************************************************************
+**
+** perform_visit_obj_cb():
+** This is the callback function invoked by H5Ovisit1 and
+** H5Ovisit2() used in test_h5o_perform_getinfo_visit().
+**
+****************************************************************/
+static int
+perform_visit_obj_cb(hid_t H5_ATTR_UNUSED group_id, const char H5_ATTR_UNUSED *name,
+ const H5O_info_t H5_ATTR_UNUSED *oinfo, void H5_ATTR_UNUSED *_op_data)
+{
+ return(H5_ITER_CONT);
+} /* end visit_obj_cb() */
+
+/****************************************************************
+**
+** test_h5o_perform_getinfo_visit():
+** Verify that H5Ovisit2 performs better than H5Ovisit1:
+** --H5Ovisit2 has fields = 0 passed to the internal
+** library routine H5O_get_info()
+** --H5Ovisit1 has fields = H5O_INFO_ALL passed to
+** internal library routine H5O_get_info()
+** 1) Create an HDF5 file
+** 2) Create a group with NUM_GROUPS sub-groups
+** 3) Attach NUM_ATTRS attributes to each sub-group
+** 4) Create NUM_DSETS datasets for each sub-group
+** 5) Visit all the objects from the root group via
+** H5Ovisit1 and H5Ovisit2
+** 6) Verify the iteration time used for H5Ovisit2 is
+** less than H5Ovisit1
+**
+****************************************************************/
+static void
+test_h5o_perform_getinfo_visit(void)
+{
+ hid_t fid = -1; /* HDF5 File ID */
+ hid_t fapl = -1; /* File access property list */
+ hid_t gid = -1; /* Group IDs */
+ hid_t asid = -1; /* Dataspace ID for the attribute */
+ unsigned i, j; /* Local index variable */
+ struct timeval startTime; /* Starting time */
+ struct timeval endTime; /* Ending time */
+ time_t new_runtime = 0.0; /* Time used for H5Oget_info2 */
+ time_t old_runtime = 0.0; /* time used for H5Oget_info1 */
+ hid_t dcpl = -1; /* Dataset creation property list */
+ hid_t sid = -1; /* Dataspace ID for dataset */
+ hid_t did = -1; /* Dataset ID */
+ hsize_t dims[2]; /* Dimension sizes */
+ hsize_t max_dims[2]; /* Maximum dimension sizes */
+ hsize_t chunk_dims[2]; /* Chunk dimension sizes */
+ unsigned wbuf[10][30]; /* Data buffer */
+ herr_t ret; /* Value returned from API calls */
+
+ fapl = H5Pcreate(H5P_FILE_ACCESS);
+ CHECK(fapl, FAIL, "H5Pcreate");
+ ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
+ CHECK(ret, FAIL, "H5Pset_libver_bounds");
+
+ /* Create a new HDF5 file */
+ fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Create dataspace for the attribute */
+ asid = H5Screate(H5S_SCALAR);
+ CHECK(asid, FAIL, "H5Screate");
+
+ /* Set up to create a chunked dataset in the group: this will use v2 B-tree chunk indexing */
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ chunk_dims[0] = chunk_dims[1] = 10;
+ H5Pset_chunk(dcpl, 2, chunk_dims);
+ dims[0] = 10;
+ dims[1] = 30;
+ max_dims[0] = max_dims[1] = H5S_UNLIMITED;
+ sid = H5Screate_simple(2, dims, max_dims);
+
+ /* Initialize write buffer */
+ for(i=0; i<dims[0]; i++)
+ for(j=0; j<dims[1]; j++)
+ wbuf[i][j] = (2 * i) - j;
+
+ /* Create the root group */
+ gid = H5Gcreate(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate");
+
+ /* Create the sub-groups */
+ for(i = 0; i < NUM_GROUPS; i++) {
+ char grpname[25]; /* Group name */
+ char attrname[25]; /* Attribute name */
+ char dname[25]; /* Dataset name */
+ hid_t gid1 = -1; /* Group ID */
+ hid_t aid = -1; /* Attribute ID */
+
+ /* Create the group name */
+ sprintf(grpname, "A%u", i);
+
+ /* Create the group */
+ gid1 = H5Gcreate(gid, grpname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid1, FAIL, "H5Gcreate");
+
+ /* Attach the attributes to the group */
+ for(j = 0; j < NUM_ATTRS; j++) {
+ /* Create the attribute name */
+ sprintf(attrname, "attr%u", j);
+ /* Create the attribute */
+ aid = H5Acreate2(gid1, attrname, H5T_NATIVE_INT, asid, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
+ /* Close the attribute */
+ ret = H5Aclose(aid);
+ CHECK(ret, FAIL, "H5Aclose");
+ }
+
+ /* Create the datasets in the group */
+ for(j = 0; j < NUM_DSETS; j++) {
+ sprintf(dname, "DNAME%u", j);
+ did = H5Dcreate2(gid1, dname, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ CHECK(did, FAIL, "H5Dcreate2");
+ ret = H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf);
+ CHECK(ret, FAIL, "H5Dwrite");
+ ret = H5Dclose(did);
+ CHECK(ret, FAIL, "H5Dclose");
+ }
+
+ /* Close the group */
+ ret = H5Gclose(gid1);
+ CHECK(ret, FAIL, "H5Gclose");
+ }
+
+ /* Close the dataspace */
+ ret = H5Sclose(asid);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close the group */
+ ret = H5Gclose(gid);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Re-open the file */
+ fid = H5Fopen(TEST_FILENAME, H5F_ACC_RDONLY, fapl);
+ CHECK(fid, FAIL, "H5Fopen");
+
+ /* Get the starting time */
+ HDgettimeofday(&startTime, 0);
+
+ /* Recursively visit all the objects from the root group via H5Ovisit2 */
+ /* Object info with fields = 0 is returned to perform_visit_obj_cb() */
+ ret = H5Ovisit2(fid, H5_INDEX_NAME, H5_ITER_INC, perform_visit_obj_cb, NULL, 0);
+ CHECK(ret, FAIL, "H5Ovisit2");
+
+ /* Get the ending time */
+ HDgettimeofday(&endTime, 0);
+
+ /* Calculate the time used for H5Ovisit2 */
+ new_runtime = (endTime.tv_sec * 1000000 + endTime.tv_usec) - (startTime.tv_sec * 1000000 + startTime.tv_usec);
+
+ /* Close the file */
+ H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Re-open the file */
+ fid = H5Fopen(TEST_FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
+ CHECK(fid, FAIL, "H5Fopen");
+
+ /* Get the starting time */
+ HDgettimeofday(&startTime, 0);
+
+ /* Recursively visit all the objects from the root group via H5Ovisit1 */
+ /* Object info with fields = H5O_INFO_ALL is returned to perform_visit_obj_cb() */
+ ret = H5Ovisit1(fid, H5_INDEX_NAME, H5_ITER_INC, perform_visit_obj_cb, NULL);
+ CHECK(ret, FAIL, "H5Literate_by_name");
+
+ /* Get the ending time */
+ HDgettimeofday(&endTime, 0);
+
+ /* Calculate the time used for H5Ovisit1 */
+ old_runtime = (endTime.tv_sec * 1000000 + endTime.tv_usec) - (startTime.tv_sec * 1000000 + startTime.tv_usec);
+
+ /* Close the file */
+ H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Close the file access property list */
+ H5Pclose(fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Verify the time used for H5Ovisit2 is better than H5Ovisit1 */
+ VERIFY(new_runtime < old_runtime, TRUE, "compare time for H5Oget_info1/2");
+
+} /* test_h5o_perform_getinfo_visit() */
+
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
/****************************************************************
@@ -1370,6 +1700,10 @@ test_h5o(void)
test_h5o_comment(); /* Test routines for comment */
test_h5o_comment_by_name(); /* Test routines for comment by name */
test_h5o_getinfo_same_file(); /* Test info for objects in the same file */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+ test_h5o_getinfo_visit(); /* Test object info for H5Oget_info1/2 and H5Ovisit1 */
+ test_h5o_perform_getinfo_visit(); /* Test that object info with fields selection perform better */
+#endif
} /* test_h5o() */
diff --git a/test/titerate.c b/test/titerate.c
index 82c26eb..1f4c0ed 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -213,7 +213,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
ret = (herr_t)H5Lget_name_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, dataset_name, (size_t)NAMELEN, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lget_name_by_idx");
- ret = H5Oget_info_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_idx2(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_idx");
} /* end for */
@@ -239,7 +239,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
ret = (herr_t)H5Lget_name_by_idx(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, dataset_name, (size_t)NAMELEN, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lget_name_by_idx");
- ret = H5Oget_info_by_idx(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_idx2(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_idx");
} /* end for */
@@ -553,7 +553,7 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR_UNUSED *link_
/*
* Get type of the object and check it.
*/
- ret = H5Oget_info_by_name(loc_id, name, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(loc_id, name, &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
if(test_info->type != oinfo.type) {
@@ -797,7 +797,7 @@ static void test_grp_memb_funcs(hid_t fapl)
obj_names[i] = HDstrdup(dataset_name);
CHECK_PTR(obj_names[i], "strdup");
- ret = H5Oget_info_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_idx2(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_idx");
if(!HDstrcmp(dataset_name, "grp"))
@@ -891,7 +891,7 @@ static void test_links(hid_t fapl)
/* Get object type */
if(linfo.type == H5L_TYPE_HARD) {
- ret = H5Oget_info_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_idx2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_idx");
} /* end if */
diff --git a/test/tmisc.c b/test/tmisc.c
index 4a77b51..0ee0302 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -674,11 +674,11 @@ test_misc4(void)
CHECK(group3, FAIL, "H5Gcreate2");
/* Get the stat information for each group */
- ret = H5Oget_info_by_name(file1, MISC4_GROUP_1, &oinfo1, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(file1, MISC4_GROUP_1, &oinfo1, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
- ret = H5Oget_info_by_name(file1, MISC4_GROUP_2, &oinfo2, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(file1, MISC4_GROUP_2, &oinfo2, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
- ret = H5Oget_info_by_name(file2, MISC4_GROUP_1, &oinfo3, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(file2, MISC4_GROUP_1, &oinfo3, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
/* Verify that the fileno values are the same for groups from file1 */
@@ -2929,7 +2929,7 @@ test_misc18(void)
CHECK(did1, FAIL, "H5Dcreate2");
/* Get object information */
- ret = H5Oget_info_by_name(fid, MISC18_DSET1_NAME, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, MISC18_DSET1_NAME, &oinfo, H5O_INFO_HDR|H5O_INFO_NUM_ATTRS, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.hdr.nmesgs, 6, "H5Oget_info_by_name");
VERIFY(oinfo.hdr.nchunks, 1, "H5Oget_info_by_name");
@@ -2942,7 +2942,7 @@ test_misc18(void)
CHECK(did2, FAIL, "H5Dcreate2");
/* Get object information */
- ret = H5Oget_info_by_name(fid, MISC18_DSET2_NAME, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, MISC18_DSET2_NAME, &oinfo, H5O_INFO_HDR|H5O_INFO_NUM_ATTRS, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.hdr.nmesgs, 6, "H5Oget_info_by_name");
VERIFY(oinfo.hdr.nchunks, 1, "H5Oget_info_by_name");
@@ -2975,7 +2975,7 @@ test_misc18(void)
} /* end for */
/* Get object information for dataset #1 now */
- ret = H5Oget_info_by_name(fid, MISC18_DSET1_NAME, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, MISC18_DSET1_NAME, &oinfo, H5O_INFO_HDR|H5O_INFO_NUM_ATTRS, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.hdr.nmesgs, 24, "H5Oget_info_by_name");
VERIFY(oinfo.hdr.nchunks, 9, "H5Oget_info_by_name");
@@ -2984,7 +2984,7 @@ test_misc18(void)
VERIFY(oinfo.num_attrs, 10, "H5Oget_info_by_name");
/* Get object information for dataset #2 now */
- ret = H5Oget_info_by_name(fid, MISC18_DSET2_NAME, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, MISC18_DSET2_NAME, &oinfo, H5O_INFO_HDR|H5O_INFO_NUM_ATTRS, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.hdr.nmesgs, 24, "H5Oget_info_by_name");
VERIFY(oinfo.hdr.nchunks, 9, "H5Oget_info_by_name");
@@ -3958,7 +3958,7 @@ test_misc23(void)
tmp_id = H5Gopen2(file_id, "/A/B01", H5P_DEFAULT);
CHECK(tmp_id, FAIL, "H5Gopen2");
- status = H5Oget_info(tmp_id, &oinfo);
+ status = H5Oget_info2(tmp_id, &oinfo, 0);
CHECK(status, FAIL, "H5Oget_info");
VERIFY(oinfo.rc, 1, "H5Oget_info");
@@ -5238,7 +5238,7 @@ test_misc30_get_info_cb(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR
{
H5O_info_t object_info;
- return H5Oget_info_by_name(loc_id, name, &object_info, H5P_DEFAULT);
+ return H5Oget_info_by_name2(loc_id, name, &object_info, 0, H5P_DEFAULT);
}
static int
@@ -5504,19 +5504,19 @@ test_misc33(void)
/* Case (1) */
H5E_BEGIN_TRY {
- ret = H5Oget_info_by_name(fid, "/soft_two", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "/soft_two", &oinfo, 0, H5P_DEFAULT);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Oget_info_by_name");
/* Case (2) */
H5E_BEGIN_TRY {
- ret = H5Oget_info_by_name(fid, "/dsetA", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "/dsetA", &oinfo, 0, H5P_DEFAULT);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Oget_info_by_name");
/* Case (3) */
H5E_BEGIN_TRY {
- ret = H5Oget_info_by_name(fid, "/soft_one", &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(fid, "/soft_one", &oinfo, 0, H5P_DEFAULT);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Oget_info_by_name");
diff --git a/test/trefer.c b/test/trefer.c
index 7cbb77f..30ad112 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -1411,7 +1411,7 @@ test_reference_group(void)
CHECK(size, FAIL, "H5Lget_name_by_idx");
VERIFY_STR(objname, DSETNAME2, "H5Lget_name_by_idx");
- ret = H5Oget_info_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)0, &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_idx2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)0, &oinfo, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_idx");
VERIFY(oinfo.type, H5O_TYPE_DATASET, "H5Oget_info_by_idx");
diff --git a/test/tsohm.c b/test/tsohm.c
index 133b196..d00a03a 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -839,7 +839,7 @@ static void test_sohm_size1(void)
CHECK_I(file, "size1_helper");
/* Get the size of a dataset object header */
- ret = H5Oget_info_by_name(file, DSETNAME[0], &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(file, DSETNAME[0], &oinfo, H5O_INFO_HDR, H5P_DEFAULT);
CHECK_I(ret, "H5Oget_info_by_name");
ret = H5Fclose(file);
CHECK_I(ret, "H5Fclose");
@@ -894,7 +894,7 @@ static void test_sohm_size1(void)
CHECK_I(file, "size1_helper");
/* Get the size of a dataset object header */
- ret = H5Oget_info_by_name(file, DSETNAME[0], &oinfo, H5P_DEFAULT);
+ ret = H5Oget_info_by_name2(file, DSETNAME[0], &oinfo, H5O_INFO_HDR, H5P_DEFAULT);
CHECK_I(ret, "H5Oget_info_by_name");
ret = H5Fclose(file);
CHECK_I(ret, "H5Fclose");
diff --git a/test/unlink.c b/test/unlink.c
index f5754f8..c3ebc4c 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -446,9 +446,9 @@ check_new_move(hid_t fapl)
FAIL_STACK_ERROR
/* Get hard link info */
- if(H5Oget_info_by_name(file, "/group2/group_new_name", &oi_hard1, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(file, "/group2/group_new_name", &oi_hard1, 0, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5Oget_info_by_name(file, "/group1/hard", &oi_hard2, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(file, "/group1/hard", &oi_hard2, 0, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
/* Check hard links */
@@ -2228,7 +2228,7 @@ test_full_group_compact(hid_t fapl)
/* Check reference count on objects to keep */
for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
sprintf(objname, "/keep/keep %u\n", u);
- if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file_id, objname, &oi, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(oi.rc != 2) TEST_ERROR
} /* end for */
@@ -2245,7 +2245,7 @@ test_full_group_compact(hid_t fapl)
/* Check reference count on objects to keep */
for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
sprintf(objname, "/keep/keep %u\n", u);
- if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file_id, objname, &oi, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(oi.rc != 1) TEST_ERROR
} /* end for */
@@ -2374,7 +2374,7 @@ test_full_group_dense(hid_t fapl)
/* Check reference count on objects to keep */
for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
sprintf(objname, "/keep/keep %u\n", u);
- if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file_id, objname, &oi, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(oi.rc != 2) TEST_ERROR
} /* end for */
@@ -2391,7 +2391,7 @@ test_full_group_dense(hid_t fapl)
/* Check reference count on objects to keep */
for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
sprintf(objname, "/keep/keep %u\n", u);
- if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file_id, objname, &oi, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(oi.rc != 1) TEST_ERROR
} /* end for */
diff --git a/test/vds.c b/test/vds.c
index 7a659cb..3f00224 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -372,7 +372,7 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl,
TEST_ERROR
/* Test H5Oget_info returns correct metadata size */
- if(H5Oget_info(dset, &oinfo) < 0)
+ if(H5Oget_info2(dset, &oinfo, H5O_INFO_META_SIZE) < 0)
TEST_ERROR
if(oinfo.meta_size.obj.index_size != (hsize_t)0)
TEST_ERROR
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 94cca58..041ac8d 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -433,7 +433,7 @@ trav_grp_symlinks(const char *path, const H5L_info_t *linfo, void *udata)
HGOTO_DONE(0);
if(h5trav_visit(tinfo->fid, path, TRUE, TRUE,
- trav_grp_objs,trav_grp_symlinks, tinfo) < 0) {
+ trav_grp_objs,trav_grp_symlinks, tinfo, 0) < 0) {
parallel_print("Error: Could not get file contents\n");
opts->err_stat = 1;
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Error: Could not get file contents");
@@ -465,7 +465,7 @@ trav_grp_symlinks(const char *path, const H5L_info_t *linfo, void *udata)
HGOTO_DONE(0);
if(h5trav_visit(tinfo->fid, path, TRUE, TRUE,
- trav_grp_objs,trav_grp_symlinks, tinfo) < 0) {
+ trav_grp_objs,trav_grp_symlinks, tinfo, 0) < 0) {
parallel_print("Error: Could not get file contents\n");
opts->err_stat = 1;
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Error: Could not get file contents\n");
@@ -645,7 +645,7 @@ h5diff(const char *fname1,
/* optional data pass */
info1_obj->opts = (diff_opt_t*)opts;
- if(H5Oget_info_by_name(file1_id, obj1fullname, &oinfo1, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(file1_id, obj1fullname, &oinfo1, 0, H5P_DEFAULT) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Error: Could not get file contents");
}
@@ -695,7 +695,7 @@ h5diff(const char *fname1,
/* optional data pass */
info2_obj->opts = (diff_opt_t*)opts;
- if(H5Oget_info_by_name(file2_id, obj2fullname, &oinfo2, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(file2_id, obj2fullname, &oinfo2, 0, H5P_DEFAULT) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Error: Could not get file contents");
}
@@ -846,7 +846,7 @@ h5diff(const char *fname1,
info1_grp->opts = (diff_opt_t*)opts;
if(h5trav_visit(file1_id, obj1fullname, TRUE, TRUE,
- trav_grp_objs, trav_grp_symlinks, info1_grp) < 0) {
+ trav_grp_objs, trav_grp_symlinks, info1_grp, 0) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Could not get file contents");
}
@@ -860,7 +860,7 @@ h5diff(const char *fname1,
info2_grp->opts = (diff_opt_t*)opts;
if(h5trav_visit(file2_id, obj2fullname, TRUE, TRUE,
- trav_grp_objs, trav_grp_symlinks, info2_grp) < 0) {
+ trav_grp_objs, trav_grp_symlinks, info2_grp, 0) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Could not get file contents");
} /* end if */
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 11f5e41..e72f738 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -2096,8 +2096,8 @@ static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t
if (nfound_b && opts->m_verbose) {
H5O_info_t oi1, oi2;
- H5Oget_info(obj1_id, &oi1);
- H5Oget_info(obj2_id, &oi2);
+ H5Oget_info2(obj1_id, &oi1, 0);
+ H5Oget_info2(obj2_id, &oi2, 0);
parallel_print("Referenced dataset %lu %lu\n", (unsigned long) oi1.addr, (unsigned long) oi2.addr);
parallel_print( "------------------------------------------------------------\n");
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 7f08cc7..4ad4c90 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -154,9 +154,9 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
h5difftrace("build_match_list_attrs start\n");
- if(H5Oget_info(loc1_id, &oinfo1) < 0)
+ if(H5Oget_info2(loc1_id, &oinfo1, H5O_INFO_NUM_ATTRS) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info first object failed");
- if(H5Oget_info(loc2_id, &oinfo2) < 0)
+ if(H5Oget_info2(loc2_id, &oinfo2, H5O_INFO_NUM_ATTRS) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info second object failed");
table_attrs_init(&table_lp);
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 11888bc..7ba82dd 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1758,14 +1758,14 @@ h5tools_is_obj_same(hid_t loc_id1, const char *name1,
hbool_t ret_val = 0;
if ( name1 && HDstrcmp(name1, "."))
- H5Oget_info_by_name(loc_id1, name1, &oinfo1, H5P_DEFAULT);
+ H5Oget_info_by_name2(loc_id1, name1, &oinfo1, 0, H5P_DEFAULT);
else
- H5Oget_info(loc_id1, &oinfo1);
+ H5Oget_info2(loc_id1, &oinfo1, 0);
if ( name2 && HDstrcmp(name2, "."))
- H5Oget_info_by_name(loc_id2, name2, &oinfo2, H5P_DEFAULT);
+ H5Oget_info_by_name2(loc_id2, name2, &oinfo2, 0, H5P_DEFAULT);
else
- H5Oget_info(loc_id2, &oinfo2);
+ H5Oget_info2(loc_id2, &oinfo2, 0);
if (oinfo1.fileno == oinfo2.fileno && oinfo1.addr==oinfo2.addr)
ret_val = 1;
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 38ace81..42f9d05 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -1905,7 +1905,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
H5O_info_t oinfo;
obj_t *obj = NULL; /* Found object */
- H5Oget_info(type, &oinfo);
+ H5Oget_info2(type, &oinfo, 0);
obj = search_obj(h5dump_type_table, oinfo.addr);
if(obj) {
diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c
index d6e5f01..a874c0f 100644
--- a/tools/lib/h5tools_ref.c
+++ b/tools/lib/h5tools_ref.c
@@ -113,7 +113,7 @@ init_ref_path_table(void)
return (-1);
/* Iterate over objects in this file */
- if(h5trav_visit(thefile, "/", TRUE, TRUE, init_ref_path_cb, NULL, NULL) < 0) {
+ if(h5trav_visit(thefile, "/", TRUE, TRUE, init_ref_path_cb, NULL, NULL, 0) < 0) {
error_msg("unable to construct reference path table\n");
h5tools_setstatus(EXIT_FAILURE);
} /* end if */
@@ -184,7 +184,7 @@ ref_path_table_lookup(const char *thepath)
/* Get the object info now */
/* (returns failure for dangling soft links) */
- if(H5Oget_info_by_name(thefile, thepath, &oi, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(thefile, thepath, &oi, 0, H5P_DEFAULT) < 0)
return HADDR_UNDEF;
/* Return OID */
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index a018394..3d029d2 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -1120,7 +1120,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
const char *path;
obj = H5Rdereference2(container, H5P_DEFAULT, H5R_OBJECT, vp);
- H5Oget_info(obj, &oi);
+ H5Oget_info2(obj, &oi, 0);
/* Print object type and close object */
switch(oi.type) {
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index 5272e81..fad3c5b 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -507,7 +507,7 @@ find_objs_cb(const char *name, const H5O_info_t *oinfo, const char *already_seen
if(H5Tcommitted(type) > 0) {
H5O_info_t type_oinfo;
- H5Oget_info(type, &type_oinfo);
+ H5Oget_info2(type, &type_oinfo, 0);
if(search_obj(info->type_table, type_oinfo.addr) == NULL)
add_obj(info->type_table, type_oinfo.addr, name, FALSE);
} /* end if */
@@ -573,7 +573,7 @@ init_objs(hid_t fid, find_objs_t *info, table_t **group_table,
info->dset_table = *dset_table;
/* Find all shared objects */
- return(h5trav_visit(fid, "/", TRUE, TRUE, find_objs_cb, NULL, info));
+ return(h5trav_visit(fid, "/", TRUE, TRUE, find_objs_cb, NULL, info, 0));
}
@@ -729,7 +729,7 @@ H5tools_get_symlink_info(hid_t file_id, const char * linkpath, h5tool_link_info_
}
/* get target object info */
- if(H5Oget_info_by_name(file_id, linkpath, &trg_oinfo, lapl) < 0) {
+ if(H5Oget_info_by_name2(file_id, linkpath, &trg_oinfo, 0, lapl) < 0) {
if(link_info->opt.msg_mode == 1)
parallel_print("Warning: unable to get object information for <%s>\n", linkpath);
HGOTO_DONE(FAIL);
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index b6d32f7..e2df439 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -43,6 +43,7 @@ typedef struct {
hbool_t is_absolute; /* Whether the traversal has absolute paths */
const char *base_grp_name; /* Name of the group that serves as the base
* for iteration */
+ unsigned fields; /* Fields needed in H5O_info_t struct */
} trav_ud_traverse_t;
typedef struct {
@@ -201,7 +202,7 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo,
H5O_info_t oinfo;
/* Get information about the object */
- if(H5Oget_info_by_name(loc_id, path, &oinfo, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(loc_id, path, &oinfo, udata->fields, H5P_DEFAULT) < 0) {
if(new_name)
HDfree(new_name);
return(H5_ITER_ERROR);
@@ -251,13 +252,13 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo,
*/
static int
traverse(hid_t file_id, const char *grp_name, hbool_t visit_start,
- hbool_t recurse, const trav_visitor_t *visitor)
+ hbool_t recurse, const trav_visitor_t *visitor, unsigned fields)
{
H5O_info_t oinfo; /* Object info for starting group */
int ret_value = SUCCEED;
/* Get info for starting object */
- if(H5Oget_info_by_name(file_id, grp_name, &oinfo, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(file_id, grp_name, &oinfo, fields, H5P_DEFAULT) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info_by_name failed");
/* Visit the starting object */
@@ -282,6 +283,7 @@ traverse(hid_t file_id, const char *grp_name, hbool_t visit_start,
udata.visitor = visitor;
udata.is_absolute = (*grp_name == '/');
udata.base_grp_name = grp_name;
+ udata.fields = fields;
/* Check for iteration of links vs. visiting all links recursively */
if(recurse) {
@@ -356,9 +358,9 @@ trav_fileinfo_add(trav_info_t *info, hid_t loc_id)
size_t idx = info->nused - 1;
if ( info->paths[idx].path && HDstrcmp(info->paths[idx].path, "."))
- H5Oget_info_by_name(loc_id, info->paths[idx].path, &oinfo, H5P_DEFAULT);
+ H5Oget_info_by_name2(loc_id, info->paths[idx].path, &oinfo, 0, H5P_DEFAULT);
else
- H5Oget_info(loc_id, &oinfo);
+ H5Oget_info2(loc_id, &oinfo, 0);
info->paths[idx].objno = oinfo.addr;
info->paths[idx].fileno = oinfo.fileno;
@@ -436,7 +438,7 @@ h5trav_getinfo(hid_t file_id, trav_info_t *info)
info_visitor.udata = info;
/* Traverse all objects in the file, visiting each object & link */
- if(traverse(file_id, "/", TRUE, TRUE, &info_visitor) < 0)
+ if(traverse(file_id, "/", TRUE, TRUE, &info_visitor, 0) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
done:
@@ -602,7 +604,7 @@ h5trav_gettable(hid_t fid, trav_table_t *table)
table_visitor.udata = table;
/* Traverse all objects in the file, visiting each object & link */
- if(traverse(fid, "/", TRUE, TRUE, &table_visitor) < 0)
+ if(traverse(fid, "/", TRUE, TRUE, &table_visitor, 0) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
done:
@@ -1027,7 +1029,7 @@ h5trav_print(hid_t fid)
print_visitor.udata = &print_udata;
/* Traverse all objects in the file, visiting each object & link */
- if(traverse(fid, "/", TRUE, TRUE, &print_visitor) < 0)
+ if(traverse(fid, "/", TRUE, TRUE, &print_visitor, 0) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
done:
@@ -1047,7 +1049,7 @@ done:
int
h5trav_visit(hid_t fid, const char *grp_name, hbool_t visit_start,
hbool_t recurse, h5trav_obj_func_t visit_obj, h5trav_lnk_func_t visit_lnk,
- void *udata)
+ void *udata, unsigned fields)
{
trav_visitor_t visitor; /* Visitor structure for objects */
int ret_value = SUCCEED;
@@ -1058,7 +1060,7 @@ h5trav_visit(hid_t fid, const char *grp_name, hbool_t visit_start,
visitor.udata = udata;
/* Traverse all objects in the file, visiting each object & link */
- if(traverse(fid, grp_name, visit_start, recurse, &visitor) < 0)
+ if(traverse(fid, grp_name, visit_start, recurse, &visitor, fields) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
done:
diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h
index c2ad9b7..a1d33b7 100644
--- a/tools/lib/h5trav.h
+++ b/tools/lib/h5trav.h
@@ -134,7 +134,7 @@ extern "C" {
H5TOOLS_DLL void h5trav_set_index(H5_index_t print_index_by, H5_iter_order_t print_index_order);
H5TOOLS_DLL int h5trav_visit(hid_t file_id, const char *grp_name,
hbool_t visit_start, hbool_t recurse, h5trav_obj_func_t visit_obj,
- h5trav_lnk_func_t visit_lnk, void *udata);
+ h5trav_lnk_func_t visit_lnk, void *udata, unsigned fields);
H5TOOLS_DLL herr_t symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, const char *path);
H5TOOLS_DLL hbool_t symlink_is_visited(symlink_trav_t *visited, H5L_type_t type, const char *file, const char *path);
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 25e4858..a0d2e6e 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -1,4 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
@@ -1482,7 +1483,7 @@ main(int argc, const char *argv[])
}
/* Get object info for root group */
- if(H5Oget_info_by_name(fid, "/", &oi, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(fid, "/", &oi, 0, H5P_DEFAULT) < 0) {
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
h5tools_setstatus(EXIT_FAILURE);
goto done;
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c
index 6646626..d4ce2da 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -229,7 +229,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
H5O_info_t oinfo;
/* Stat the object */
- if(H5Oget_info_by_name(group, name, &oinfo, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(group, name, &oinfo, 0, H5P_DEFAULT) < 0) {
error_msg("unable to get object information for \"%s\"\n", name);
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -706,7 +706,7 @@ dump_named_datatype(hid_t tid, const char *name)
h5tools_dump_header_format->datatypeblockbegin);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- H5Oget_info(tid, &oinfo);
+ H5Oget_info2(tid, &oinfo, 0);
/* Must check for uniqueness of all objects if we've traversed an elink,
* otherwise only check if the reference count > 1.
@@ -876,7 +876,7 @@ dump_group(hid_t gid, const char *name)
h5tools_dump_comment(rawoutstream, outputformat, &ctx, gid);
- H5Oget_info(gid, &oinfo);
+ H5Oget_info2(gid, &oinfo, 0);
/* Must check for uniqueness of all objects if we've traversed an elink,
* otherwise only check if the reference count > 1.
@@ -1512,7 +1512,7 @@ handle_paths(hid_t fid, const char *path_name, void H5_ATTR_UNUSED * data, int H
handle_udata.fid = fid;
handle_udata.op_name = path_name;
- if(h5trav_visit(fid, "/", TRUE, TRUE, obj_search, lnk_search, &handle_udata) < 0) {
+ if(h5trav_visit(fid, "/", TRUE, TRUE, obj_search, lnk_search, &handle_udata, 0) < 0) {
error_msg("error traversing information\n");
h5tools_setstatus(EXIT_FAILURE);
}
@@ -1800,7 +1800,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
} /* end if */
- H5Oget_info(dsetid, &oinfo);
+ H5Oget_info2(dsetid, &oinfo, 0);
if(oinfo.rc > 1 || hit_elink) {
obj_t *found_obj; /* Found object */
@@ -2101,7 +2101,7 @@ dump_extlink(hid_t group, const char *linkname, const char *objname)
goto fail;
/* Get object info */
- if (H5Oget_info(oid, &oi) < 0) {
+ if (H5Oget_info2(oid, &oi, 0) < 0) {
H5Oclose(oid);
goto fail;
}
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index 4e13df3..6c04aef 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -180,7 +180,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_
H5O_info_t oinfo;
/* Stat the object */
- if(H5Oget_info_by_name(group, name, &oinfo, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(group, name, &oinfo, 0, H5P_DEFAULT) < 0) {
error_msg("unable to get object information for \"%s\"\n", name);
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -881,7 +881,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
obj_t *found_obj; /* Found object */
/* detect a shared datatype, output only once */
- H5Oget_info(type, &oinfo);
+ H5Oget_info2(type, &oinfo, 0);
found_obj = search_obj(type_table, oinfo.addr);
if(found_obj) {
@@ -1534,7 +1534,7 @@ xml_dump_datatype(hid_t type)
obj_t *found_obj; /* Found object */
/* Datatype is a shared or named datatype */
- H5Oget_info(type, &oinfo);
+ H5Oget_info2(type, &oinfo, 0);
found_obj = search_obj(type_table, oinfo.addr);
if(found_obj) {
@@ -2362,7 +2362,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
/* Check uniqueness of named datatype */
- H5Oget_info(type, &oinfo);
+ H5Oget_info2(type, &oinfo, 0);
if(oinfo.rc > 1) {
obj_t *found_obj; /* Found object */
@@ -2548,7 +2548,7 @@ xml_dump_group(hid_t gid, const char *name)
}
}
- H5Oget_info(gid, &oinfo);
+ H5Oget_info2(gid, &oinfo, 0);
if(oinfo.rc > 1) {
obj_t *found_obj; /* Found object */
diff --git a/tools/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c
index 2bfe280..cb1be4d 100644
--- a/tools/src/h5format_convert/h5format_convert.c
+++ b/tools/src/h5format_convert/h5format_convert.c
@@ -430,7 +430,7 @@ main(int argc, const char *argv[])
} else { /* Convert all datasets in the file */
if(verbose_g)
HDfprintf(stdout, "Processing all datasets in the file...\n");
- if(h5trav_visit(fid, "/", TRUE, TRUE, convert_dsets_cb, NULL, &fid) < 0)
+ if(h5trav_visit(fid, "/", TRUE, TRUE, convert_dsets_cb, NULL, &fid, 0) < 0)
goto done;
} /* end else */
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index a07d308..653438d 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -1320,7 +1320,7 @@ print_type(h5tools_str_t *buffer, hid_t type, int ind)
if(H5Tcommitted(type)) {
H5O_info_t oi;
- if(H5Oget_info(type, &oi) >= 0)
+ if(H5Oget_info2(type, &oi, 0) >= 0)
h5tools_str_append(buffer,"shared-%lu:"H5_PRINTF_HADDR_FMT" ",
oi.fileno, oi.addr);
else
@@ -2386,7 +2386,7 @@ visit_obj(hid_t file, const char *oname, iter_t *iter)
h5tools_str_reset(&buffer);
/* Retrieve info for object to list */
- if(H5Oget_info_by_name(file, oname, &oi, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(file, oname, &oi, H5O_INFO_TIME, H5P_DEFAULT) < 0) {
if(iter->symlink_target) {
h5tools_str_append(&buffer, "{**NOT FOUND**}\n");
iter->symlink_target = FALSE;
@@ -2414,7 +2414,7 @@ visit_obj(hid_t file, const char *oname, iter_t *iter)
iter->name_start = iter->base_len;
/* Specified name is a group. List the complete contents of the group. */
- h5trav_visit(file, oname, (hbool_t) (display_root_g || iter->symlink_target), recursive_g, list_obj, list_lnk, iter);
+ h5trav_visit(file, oname, (hbool_t) (display_root_g || iter->symlink_target), recursive_g, list_obj, list_lnk, iter, H5O_INFO_TIME);
/* Close group */
if(!iter->symlink_target)
diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c
index e7f4aae..aa2d909 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -222,7 +222,7 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout,
H5O_info_t oinfo; /* Object info of input dtype */
hid_t ret_value = -1; /* The identifier of the named dtype in the out file */
- if (H5Oget_info(type_in, &oinfo) < 0)
+ if (H5Oget_info2(type_in, &oinfo, 0) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed");
if (*named_dt_head_p) {
@@ -352,7 +352,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p,
hbool_t is_ref = 0;
H5T_class_t type_class = -1;
- if (H5Oget_info(loc_in, &oinfo) < 0)
+ if (H5Oget_info2(loc_in, &oinfo, H5O_INFO_NUM_ATTRS) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed");
/*-------------------------------------------------------------------------
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index 7b610a3..80c98b5 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -456,7 +456,7 @@ static int copy_refs_attr(hid_t loc_in,
int ref_comp_field_n = 0;
- if(H5Oget_info(loc_in, &oinfo) < 0)
+ if(H5Oget_info2(loc_in, &oinfo, H5O_INFO_NUM_ATTRS) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed");
for(u = 0; u < (unsigned)oinfo.num_attrs; u++) {
@@ -807,7 +807,7 @@ MapIdToName(hid_t refobj_id, trav_table_t *travt)
H5O_info_t ref_oinfo; /* Stat for the refobj id */
/* obtain information to identify the referenced object uniquely */
- if(H5Oget_info(refobj_id, &ref_oinfo) < 0)
+ if(H5Oget_info2(refobj_id, &ref_oinfo, 0) < 0)
goto out;
if(ref_oinfo.addr == travt->objs[u].objno) {
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index 6f196b4..da713ac 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -1788,14 +1788,14 @@ main(int argc, const char *argv[])
unsigned u;
for(u = 0; u < hand->obj_count; u++) {
- if(h5trav_visit(fid, hand->obj[u], TRUE, TRUE, obj_stats, lnk_stats, &iter) < 0)
+ if(h5trav_visit(fid, hand->obj[u], TRUE, TRUE, obj_stats, lnk_stats, &iter, H5O_INFO_ALL) < 0)
warn_msg("Unable to traverse object \"%s\"\n", hand->obj[u]);
else
print_statistics(hand->obj[u], &iter);
} /* end for */
} /* end if */
else {
- if(h5trav_visit(fid, "/", TRUE, TRUE, obj_stats, lnk_stats, &iter) < 0)
+ if(h5trav_visit(fid, "/", TRUE, TRUE, obj_stats, lnk_stats, &iter, H5O_INFO_ALL) < 0)
warn_msg("Unable to traverse objects/links in file \"%s\"\n", fname);
else
print_statistics("/", &iter);