summaryrefslogtreecommitdiffstats
path: root/src/H5Gdeprec.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 /src/H5Gdeprec.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 'src/H5Gdeprec.c')
-rw-r--r--src/H5Gdeprec.c99
1 files changed, 50 insertions, 49 deletions
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 9145b3b..bf90f1e 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -787,6 +787,56 @@ H5Giterate(hid_t loc_id, const char *name, int *idx_p, H5G_iterate_t op,
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Giterate() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Gget_num_objs
+ *
+ * Purpose: Returns the number of objects in the group. It iterates
+ * all B-tree leaves and sum up total number of group members.
+ *
+ * Note: Deprecated in favor of H5Gget_info
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Raymond Lu
+ * Nov 20, 2002
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs)
+{
+ H5G_loc_t loc; /* Location of object */
+ H5G_info_t grp_info; /* Group information */
+ H5O_type_t obj_type; /* Type of object at location */
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_API(H5Gget_num_objs, FAIL)
+ H5TRACE2("e", "i*h", loc_id, num_objs);
+
+ /* Check args */
+ if(H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location ID")
+ if(H5O_obj_type(loc.oloc, &obj_type, H5AC_ind_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type")
+ if(obj_type != H5O_TYPE_GROUP)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
+ if(!num_objs)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad pointer to # of objects")
+
+ /* Retrieve information about the group */
+ if(H5G_obj_info(loc.oloc, &grp_info, H5AC_ind_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't determine")
+
+ /* Set the number of objects [sic: links] in the group */
+ *num_objs = grp_info.nlinks;
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Gget_num_objs() */
+
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -1022,52 +1072,3 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_get_objinfo() */
-
-/*-------------------------------------------------------------------------
- * Function: H5Gget_num_objs
- *
- * Purpose: Returns the number of objects in the group. It iterates
- * all B-tree leaves and sum up total number of group members.
- *
- * Note: Deprecated in favor of H5Gget_info
- *
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Raymond Lu
- * Nov 20, 2002
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs)
-{
- H5G_loc_t loc; /* Location of object */
- H5G_info_t grp_info; /* Group information */
- H5O_type_t obj_type; /* Type of object at location */
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_API(H5Gget_num_objs, FAIL)
- H5TRACE2("e", "i*h", loc_id, num_objs);
-
- /* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location ID")
- if(H5O_obj_type(loc.oloc, &obj_type, H5AC_ind_dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type")
- if(obj_type != H5O_TYPE_GROUP)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
- if(!num_objs)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad pointer to # of objects")
-
- /* Retrieve information about the group */
- if(H5G_obj_info(loc.oloc, &grp_info, H5AC_ind_dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't determine")
-
- /* Set the number of objects [sic: links] in the group */
- *num_objs = grp_info.nlinks;
-
-done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Gget_num_objs() */
-