diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-12-29 14:26:20 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-12-29 14:26:20 (GMT) |
commit | 427ff7da2848042f68ecfadf5a321b1d8077e9db (patch) | |
tree | 73024b1954031fbb724c2d96a485590348e5cc22 /src/H5Gnode.c | |
parent | 9b96fd2003ae74cca389cc4c2216b4371d6eb173 (diff) | |
download | hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.zip hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.tar.gz hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.tar.bz2 |
[svn-r9727] Purpose:
Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-)
Description:
Generally speaking, this is the "signed->unsigned" change to selections.
However, in the process of merging code back, things got stickier and stickier
until I ended up doing a big "sync the two branches up" operation. So... I
brought back all the "infrastructure" fixes from the development branch to the
release branch (which I think were actually making some improvement in
performance) as well as fixed several bugs which had been fixed in one branch,
but not the other.
I've also tagged the repository before making this checkin with the label
"before_signed_unsigned_changes".
Platforms tested:
FreeBSD 4.10 (sleipnir) w/parallel & fphdf5
FreeBSD 4.10 (sleipnir) w/threadsafe
FreeBSD 4.10 (sleipnir) w/backward compatibility
Solaris 2.7 (arabica) w/"purify options"
Solaris 2.8 (sol) w/FORTRAN & C++
AIX 5.x (copper) w/parallel & FORTRAN
IRIX64 6.5 (modi4) w/FORTRAN
Linux 2.4 (heping) w/FORTRAN & C++
Misc. update:
Diffstat (limited to 'src/H5Gnode.c')
-rw-r--r-- | src/H5Gnode.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/H5Gnode.c b/src/H5Gnode.c index e690108..e6c1776 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -65,7 +65,7 @@ typedef struct H5G_node_key_t { /* PRIVATE PROTOTYPES */ static herr_t H5G_node_serialize(H5F_t *f, H5G_node_t *sym, size_t size, uint8_t *buf); -static size_t H5G_node_size(H5F_t *f); +static size_t H5G_node_size(const H5F_t *f); static herr_t H5G_node_shared_free(void *shared); /* Metadata cache callbacks */ @@ -75,11 +75,11 @@ static herr_t H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t a H5G_node_t *sym); static herr_t H5G_node_dest(H5F_t *f, H5G_node_t *sym); static herr_t H5G_node_clear(H5F_t *f, H5G_node_t *sym, hbool_t destroy); -static herr_t H5G_compute_size(H5F_t *f, H5G_node_t *sym, size_t *size_ptr); +static herr_t H5G_compute_size(const H5F_t *f, const H5G_node_t *sym, size_t *size_ptr); /* B-tree callbacks */ static size_t H5G_node_sizeof_rkey(const H5F_t *f, const void *_udata); -static H5RC_t *H5G_node_get_shared(H5F_t *f, const void *_udata); +static H5RC_t *H5G_node_get_shared(const H5F_t *f, const void *_udata); static herr_t H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t op, void *_lt_key, void *_udata, void *_rt_key, haddr_t *addr_p/*out*/); @@ -88,7 +88,7 @@ static int H5G_node_cmp2(H5F_t *f, hid_t dxpl_id, void *_lt_key, void *_udata, static int H5G_node_cmp3(H5F_t *f, hid_t dxpl_id, void *_lt_key, void *_udata, void *_rt_key); static herr_t H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_lt_key, - void *_udata, const void *_rt_key); + void *_udata); static H5B_ins_t H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key, hbool_t *lt_key_changed, void *_md_key, void *_udata, void *_rt_key, @@ -97,9 +97,9 @@ static H5B_ins_t H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_l static H5B_ins_t H5G_node_remove(H5F_t *f, hid_t dxpl_id, 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_decode_key(H5F_t *f, H5B_t *bt, uint8_t *raw, +static herr_t H5G_node_decode_key(const H5F_t *f, const H5B_t *bt, const uint8_t *raw, void *_key); -static herr_t H5G_node_encode_key(H5F_t *f, H5B_t *bt, uint8_t *raw, +static herr_t H5G_node_encode_key(const H5F_t *f, const H5B_t *bt, uint8_t *raw, void *_key); static herr_t H5G_node_debug_key(FILE *stream, H5F_t *f, hid_t dxpl_id, int indent, int fwidth, const void *key, @@ -199,7 +199,7 @@ H5G_node_sizeof_rkey(const H5F_t *f, const void UNUSED * udata) *------------------------------------------------------------------------- */ static H5RC_t * -H5G_node_get_shared(H5F_t *f, const void UNUSED *_udata) +H5G_node_get_shared(const H5F_t *f, const void UNUSED *_udata) { H5RC_t *rc; @@ -232,7 +232,7 @@ H5G_node_get_shared(H5F_t *f, const void UNUSED *_udata) *------------------------------------------------------------------------- */ static herr_t -H5G_node_decode_key(H5F_t *f, H5B_t UNUSED *bt, uint8_t *raw, void *_key) +H5G_node_decode_key(const H5F_t *f, const H5B_t UNUSED *bt, const uint8_t *raw, void *_key) { H5G_node_key_t *key = (H5G_node_key_t *) _key; @@ -264,7 +264,7 @@ H5G_node_decode_key(H5F_t *f, H5B_t UNUSED *bt, uint8_t *raw, void *_key) *------------------------------------------------------------------------- */ static herr_t -H5G_node_encode_key(H5F_t *f, H5B_t UNUSED *bt, uint8_t *raw, void *_key) +H5G_node_encode_key(const H5F_t *f, const H5B_t UNUSED *bt, uint8_t *raw, void *_key) { H5G_node_key_t *key = (H5G_node_key_t *) _key; @@ -344,7 +344,7 @@ done: *------------------------------------------------------------------------- */ static size_t -H5G_node_size(H5F_t *f) +H5G_node_size(const H5F_t *f) { FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_node_size); @@ -686,7 +686,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5G_compute_size(H5F_t *f, H5G_node_t UNUSED *sym, size_t *size_ptr) +H5G_compute_size(const H5F_t *f, const H5G_node_t UNUSED *sym, size_t *size_ptr) { FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_compute_size); @@ -932,7 +932,7 @@ done: */ static herr_t H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED *_lt_key, - void *_udata, const void UNUSED *_rt_key) + void *_udata) { H5G_bt_ud1_t *bt_udata = (H5G_bt_ud1_t *) _udata; H5G_node_t *sn = NULL; @@ -1043,7 +1043,7 @@ done: static H5B_ins_t H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void UNUSED *_lt_key, hbool_t UNUSED *lt_key_changed, void *_md_key, - void *_udata, void *_rt_key, hbool_t UNUSED *rt_key_changed, + void *_udata, void *_rt_key, hbool_t *rt_key_changed, haddr_t *new_node_p) { H5G_node_key_t *md_key = (H5G_node_key_t *) _md_key; @@ -1458,8 +1458,8 @@ done: *------------------------------------------------------------------------- */ int -H5G_node_iterate (H5F_t *f, hid_t dxpl_id, void UNUSED *_lt_key, haddr_t addr, - void UNUSED *_rt_key, void *_udata) +H5G_node_iterate (H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr, + const void UNUSED *_rt_key, void *_udata) { H5G_bt_ud2_t *bt_udata = (H5G_bt_ud2_t *)_udata; H5G_node_t *sn = NULL; @@ -1486,7 +1486,7 @@ H5G_node_iterate (H5F_t *f, hid_t dxpl_id, void UNUSED *_lt_key, haddr_t addr, if (NULL == (sn = H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, NULL, NULL, H5AC_READ))) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_ITER_ERROR, "unable to load symbol table node"); nsyms = sn->nsyms; - if (NULL==(name_off = H5FL_SEQ_MALLOC(size_t, nsyms))) + if (NULL==(name_off = H5FL_SEQ_MALLOC(size_t, (size_t)nsyms))) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, H5B_ITER_ERROR, "memory allocation failed"); for (i=0; i<nsyms; i++) name_off[i] = sn->entry[i].name_off; @@ -1566,8 +1566,8 @@ done: *------------------------------------------------------------------------- */ int -H5G_node_sumup(H5F_t *f, hid_t dxpl_id, void UNUSED *_lt_key, haddr_t addr, - void UNUSED *_rt_key, void *_udata) +H5G_node_sumup(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr, + const void UNUSED *_rt_key, void *_udata) { hsize_t *num_objs = (hsize_t *)_udata; H5G_node_t *sn = NULL; @@ -1613,8 +1613,8 @@ done: *------------------------------------------------------------------------- */ int -H5G_node_name(H5F_t *f, hid_t dxpl_id, void UNUSED *_lt_key, haddr_t addr, - void UNUSED *_rt_key, void *_udata) +H5G_node_name(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr, + const void UNUSED *_rt_key, void *_udata) { H5G_bt_ud3_t *bt_udata = (H5G_bt_ud3_t *)_udata; const H5HL_t *heap = NULL; @@ -1682,8 +1682,8 @@ done: *------------------------------------------------------------------------- */ int -H5G_node_type(H5F_t *f, hid_t dxpl_id, void UNUSED *_lt_key, haddr_t addr, - void UNUSED *_rt_key, void *_udata) +H5G_node_type(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr, + const void UNUSED *_rt_key, void *_udata) { H5G_bt_ud3_t *bt_udata = (H5G_bt_ud3_t*)_udata; hsize_t loc_idx; |