diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-06-20 15:19:18 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-06-20 15:19:18 (GMT) |
commit | 970416829fb40ee7f1c33fe1289e9b7b88ad84a9 (patch) | |
tree | c344e5f62bb295d7e6385ef6918f9761c751b5b0 | |
parent | e34f6e8c9ef53157422f871b4f674946d02370d3 (diff) | |
download | hdf5-970416829fb40ee7f1c33fe1289e9b7b88ad84a9.zip hdf5-970416829fb40ee7f1c33fe1289e9b7b88ad84a9.tar.gz hdf5-970416829fb40ee7f1c33fe1289e9b7b88ad84a9.tar.bz2 |
[svn-r7071] Purpose:
Code cleanup
Description:
Tweak internal iterator over IDs to not require constant "operator" data.
Platforms tested:
FreeBSD 4.8 (sleipnir)
h5committest
-rw-r--r-- | src/H5G.c | 6 | ||||
-rw-r--r-- | src/H5I.c | 2 | ||||
-rw-r--r-- | src/H5Iprivate.h | 5 | ||||
-rw-r--r-- | src/H5P.c | 2 | ||||
-rw-r--r-- | src/H5T.c | 2 |
5 files changed, 8 insertions, 9 deletions
@@ -183,7 +183,7 @@ static herr_t H5G_unlink(H5G_entry_t *loc, const char *name, hid_t dxpl_id); static herr_t H5G_get_num_objs(H5G_t *grp, hsize_t *num_objs, hid_t dxpl_id); static ssize_t H5G_get_objname_by_idx(H5G_t *grp, hsize_t idx, char* name, size_t size, hid_t dxpl_id); static int H5G_get_objtype_by_idx(H5G_t *grp, hsize_t idx, hid_t dxpl_id); -static herr_t H5G_replace_ent(void *obj_ptr, hid_t obj_id, const void *key); +static int H5G_replace_ent(void *obj_ptr, hid_t obj_id, void *key); static herr_t H5G_traverse_slink(H5G_entry_t *grp_ent/*in,out*/, H5G_entry_t *obj_ent/*in,out*/, int *nlinks/*in,out*/, hid_t dxpl_id); static herr_t H5G_set_comment(H5G_entry_t *loc, const char *name, @@ -3288,8 +3288,8 @@ done: * *------------------------------------------------------------------------- */ -static herr_t -H5G_replace_ent(void *obj_ptr, hid_t obj_id, const void *key) +static int +H5G_replace_ent(void *obj_ptr, hid_t obj_id, void *key) { const H5G_names_t *names = (const H5G_names_t *)key; /* Get operation's information */ H5G_entry_t *ent = NULL; /* Group entry for object that the ID refers to */ @@ -1064,7 +1064,7 @@ done: *------------------------------------------------------------------------- */ void * -H5I_search(H5I_type_t grp, H5I_search_func_t func, const void *key) +H5I_search(H5I_type_t grp, H5I_search_func_t func, void *key) { H5I_id_group_t *grp_ptr = NULL; /*ptr to the group */ H5I_id_info_t *id_ptr = NULL; /*ptr to the new ID */ diff --git a/src/H5Iprivate.h b/src/H5Iprivate.h index 8ef4bf6..766d7df 100644 --- a/src/H5Iprivate.h +++ b/src/H5Iprivate.h @@ -53,7 +53,7 @@ typedef herr_t (*H5I_free_t)(void*); /* Type of the function to compare objects & keys */ -typedef int (*H5I_search_func_t)(void *obj, hid_t id, const void *key); +typedef int (*H5I_search_func_t)(void *obj, hid_t id, void *key); /* Private Functions in H5I.c */ H5_DLL int H5I_init_group(H5I_type_t grp, size_t hash_size, unsigned reserved, @@ -66,8 +66,7 @@ H5_DLL void *H5I_object(hid_t id); H5_DLL void *H5I_object_verify(hid_t id, H5I_type_t id_type); H5_DLL H5I_type_t H5I_get_type(hid_t id); H5_DLL void *H5I_remove(hid_t id); -H5_DLL void *H5I_search(H5I_type_t grp, H5I_search_func_t func, - const void *key); +H5_DLL void *H5I_search(H5I_type_t grp, H5I_search_func_t func, void *key); H5_DLL int H5I_inc_ref(hid_t id); H5_DLL int H5I_dec_ref(hid_t id); #endif @@ -1282,7 +1282,7 @@ H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod) REVISION LOG --------------------------------------------------------------------------*/ static int -H5P_check_class(void *_obj, hid_t id, const void *_key) +H5P_check_class(void *_obj, hid_t id, void *_key) { H5P_genclass_t *obj=(H5P_genclass_t *)_obj; /* Pointer to the class for this ID */ const H5P_check_class_t *key=(const H5P_check_class_t *)_key; /* Pointer to key information for comparison */ @@ -1853,7 +1853,7 @@ done: *------------------------------------------------------------------------- */ static int -H5T_unlock_cb (void *_dt, hid_t UNUSED id, const void UNUSED *key) +H5T_unlock_cb (void *_dt, hid_t UNUSED id, void UNUSED *key) { H5T_t *dt = (H5T_t *)_dt; |