summaryrefslogtreecommitdiffstats
path: root/src/H5I.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2013-05-08 16:36:58 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2013-05-08 16:36:58 (GMT)
commit90ccb5c3c3efe341071ae4cdf41db8cc3d2e8906 (patch)
tree2f751f8eed8d2ea10e4819457340151488ceba36 /src/H5I.c
parent8ec42ced8063d739ec6c3d656b0556c3aafbc395 (diff)
downloadhdf5-90ccb5c3c3efe341071ae4cdf41db8cc3d2e8906.zip
hdf5-90ccb5c3c3efe341071ae4cdf41db8cc3d2e8906.tar.gz
hdf5-90ccb5c3c3efe341071ae4cdf41db8cc3d2e8906.tar.bz2
[svn-r23685] Issue 8380 H5Zunregister caused seg fault. I simplied the iteration process over datasets, groups, and files as Quincey suggested. I also removed H5I_search that I introduced in last commit but didn't actually used it.
Tested on jam and koala - simple change.
Diffstat (limited to 'src/H5I.c')
-rw-r--r--src/H5I.c42
1 files changed, 4 insertions, 38 deletions
diff --git a/src/H5I.c b/src/H5I.c
index 6a8c269..581356e 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -2002,55 +2002,21 @@ H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key)
if(H5I_IS_LIB_TYPE(type))
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "cannot call public function on library type")
- if((ret_value = H5I_search(type, func, key)) == NULL)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "cannot call public function on library type")
-
-done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Isearch() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5I_search
- *
- * Purpose: Private function for H5Isearch
- *
- * Return: Success: The first object in the type for which FUNC
- * returns non-zero. NULL if FUNC returned zero
- * for every object in the type.
- *
- * Failure: NULL
- *
- * Programmer: James Laird
- * Nathaniel Furrer
- * Friday, April 23, 2004
- *
- *-------------------------------------------------------------------------
- */
-void *
-H5I_search(H5I_type_t _type, H5I_search_func_t _func, void *_key)
-{
- H5I_search_ud_t udata; /* Context for iteration */
- void *ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(NULL)
-
/* Set up udata struct */
- udata.app_cb = _func;
- udata.app_key = _key;
+ udata.app_cb = func;
+ udata.app_key = key;
udata.ret_obj = NULL;
/* Note that H5I_iterate returns an error code. We ignore it
* here, as we can't do anything with it without revising the API.
*/
- if(H5I_iterate(_type, H5I_search_cb, &udata, TRUE) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "cannot call public function on library type")
+ H5I_iterate(type, H5I_search_cb, &udata, TRUE);
/* Set return value */
ret_value = udata.ret_obj;
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_API(ret_value)
} /* end H5Isearch() */