summaryrefslogtreecommitdiffstats
path: root/fortran
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 /fortran
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 'fortran')
-rw-r--r--fortran/src/H5Gf.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c
index 3796b73..5fbaec27 100644
--- a/fortran/src/H5Gf.c
+++ b/fortran/src/H5Gf.c
@@ -197,7 +197,7 @@ DONE:
/*----------------------------------------------------------------------------
* Name: h5gn_members_c
- * Purpose: Call H5Gn_members to find number of objects in the group
+ * Purpose: Call H5Gget_num_objs to find number of objects in the group
* Inputs: loc_id - file or group identifier
* name - name of the group
* namelen - name length
@@ -211,8 +211,7 @@ int_f
nh5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers)
{
char *c_name = NULL;
- hsize_t c_nmembers;
- hid_t gid = (-1);
+ H5G_info_t ginfo;
int ret_value = -1;
/*
@@ -221,22 +220,14 @@ nh5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers)
if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
- /* Get a temporary group ID for the group to query */
- if((gid = H5Gopen2((hid_t)*loc_id, c_name, H5P_DEFAULT)) < 0)
- goto DONE;
-
- /* Call H5Gget_num_objs() for the number of objects in the group */
- if(H5Gget_num_objs(gid, &c_nmembers) < 0)
+ /* Call H5Gget_info() for the number of objects in the group */
+ if(H5Gget_info((hid_t)*loc_id, c_name, &ginfo, H5P_DEFAULT) < 0)
goto DONE;
- *nmembers = (int_f)c_nmembers;
+ *nmembers = (int_f)ginfo.nlinks;
ret_value = 0;
DONE:
- /* Close the temporary group, if it was opened */
- if(gid > 0)
- H5Gclose(gid);
-
if(c_name)
HDfree(c_name);
return ret_value;