diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-04-23 16:01:43 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-04-23 16:01:43 (GMT) |
commit | f99a4120573eb8bcededc20a91be8fa520d4ebfa (patch) | |
tree | 87fd804f59a537819fb669fecda5598d6e964fd6 /src/H5Gnode.c | |
parent | ac917c1f07c0af2e8de40a841223f72a85eaa7ee (diff) | |
download | hdf5-f99a4120573eb8bcededc20a91be8fa520d4ebfa.zip hdf5-f99a4120573eb8bcededc20a91be8fa520d4ebfa.tar.gz hdf5-f99a4120573eb8bcededc20a91be8fa520d4ebfa.tar.bz2 |
[svn-r5230] Purpose:
Code cleanup
Description:
Clean up the H5B_iterate code to not have a single hard-wired iterator for
each interface which uses a B-tree, instead accept a function pointer which
determines the callback function. This allows additional iterator
callbacks to be defined without requiring additional H5B functions to be
created.
In that spirit, remove the H5B_prune_by_extent call and convert the
H5F_istore callback routine for it into a callback routine for H5B_iterate.
Platforms tested:
FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'src/H5Gnode.c')
-rw-r--r-- | src/H5Gnode.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/H5Gnode.c b/src/H5Gnode.c index d4b3df2..d830a6b 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -66,8 +66,6 @@ static H5B_ins_t H5G_node_insert(H5F_t *f, haddr_t addr, void *_lt_key, static H5B_ins_t H5G_node_remove(H5F_t *f, haddr_t addr, void *lt_key, hbool_t *lt_key_changed, void *udata, void *rt_key, hbool_t *rt_key_changed); -static herr_t H5G_node_iterate(H5F_t *f, void *_lt_key, haddr_t addr, - void *_rt_key, void *_udata); static size_t H5G_node_sizeof_rkey(H5F_t *f, const void *_udata); /* H5G inherits cache-like properties from H5AC */ @@ -90,11 +88,9 @@ H5B_class_t H5B_SNODE[1] = {{ TRUE, /*follow min branch? */ TRUE, /*follow max branch? */ H5G_node_remove, /*remove */ - H5G_node_iterate, /*list */ H5G_node_decode_key, /*decode */ H5G_node_encode_key, /*encode */ NULL, /*debug key */ - NULL, /*remove chunks, upon H5Dset_extend call */ }}; /* Interface initialization */ @@ -1058,9 +1054,12 @@ H5G_node_remove(H5F_t *f, haddr_t addr, void *_lt_key/*in,out*/, * Modifications: * Robb Matzke, 1999-07-28 * The ADDR argument is passed by value. + * + * Quincey Koziol, 2002-04-22 + * Changed to callback from H5B_iterate *------------------------------------------------------------------------- */ -static herr_t +herr_t H5G_node_iterate (H5F_t *f, void UNUSED *_lt_key, haddr_t addr, void UNUSED *_rt_key, void *_udata) { |