summaryrefslogtreecommitdiffstats
path: root/test/objcopy.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-09-06 15:54:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-09-06 15:54:22 (GMT)
commit3bed8703631cbcffb215ccd82235fcc293e14218 (patch)
treebf56b0bcd4f41986f17138059f6349df78f0c059 /test/objcopy.c
parent3eb8c81b8046d282ced9c2d94e7132058243013e (diff)
downloadhdf5-3bed8703631cbcffb215ccd82235fcc293e14218.zip
hdf5-3bed8703631cbcffb215ccd82235fcc293e14218.tar.gz
hdf5-3bed8703631cbcffb215ccd82235fcc293e14218.tar.bz2
[svn-r14136] Description:
Move H5Gget_num_objs() and several minor macros, etc. to deprecated symbols section, replacing it with H5Gget_info(). Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) AIX/32 5.3 (copper) Solaris/32 5.10 (linew) Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'test/objcopy.c')
-rwxr-xr-xtest/objcopy.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/objcopy.c b/test/objcopy.c
index 3c6e03f..331add3 100755
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -1242,8 +1242,8 @@ error:
static int
compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
{
- hsize_t num_objs; /* Number of objects in group */
- hsize_t num_objs2; /* Number of objects in group */
+ H5G_info_t ginfo; /* Group info struct */
+ H5G_info_t ginfo2; /* Group info struct */
hsize_t idx; /* Index over the objects in group */
unsigned cpy_flags; /* Object copy flags */
@@ -1255,17 +1255,17 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
cpy_flags = 0;
/* Check if both groups have the same # of objects */
- if(H5Gget_num_objs(gid, &num_objs) < 0) TEST_ERROR
- if(H5Gget_num_objs(gid2, &num_objs2) < 0) TEST_ERROR
+ if(H5Gget_info(gid, ".", &ginfo, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Gget_info(gid2, ".", &ginfo2, H5P_DEFAULT) < 0) TEST_ERROR
if((cpy_flags & H5O_COPY_SHALLOW_HIERARCHY_FLAG) && depth == 0) {
- if(num_objs2 != 0) TEST_ERROR
+ if(ginfo2.nlinks != 0) TEST_ERROR
} /* end if */
else {
- if(num_objs != num_objs2) TEST_ERROR
+ if(ginfo.nlinks != ginfo2.nlinks) TEST_ERROR
} /* end if */
/* Check contents of groups */
- if(num_objs2 > 0) {
+ if(ginfo2.nlinks > 0) {
char objname[NAME_BUF_SIZE]; /* Name of object in group */
char objname2[NAME_BUF_SIZE]; /* Name of object in group */
H5G_obj_t objtype; /* Type of object in group */
@@ -1277,7 +1277,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
hid_t oid, oid2; /* IDs of objects within group */
/* Loop over contents of groups */
- for(idx = 0; idx < num_objs; idx++) {
+ for(idx = 0; idx < ginfo.nlinks; idx++) {
/* Check name of objects */
if(H5Gget_objname_by_idx(gid, idx, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR
if(H5Gget_objname_by_idx(gid2, idx, objname2, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR