mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
[svn-r27079] Description:
Clean up H5G interface, to align w/v3 metadata cache changes Tested on: MacOSX/64 10.10.3 (amazon) w/serial & parallel Linux/32 2.6.* (jam) w/serial & parallel
This commit is contained in:
parent
8fd9d6b53f
commit
5c437fa51f
@ -145,10 +145,10 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
|
||||
|
||||
/* Allocate symbol table data structures */
|
||||
if(NULL == (sym = H5FL_CALLOC(H5G_node_t)))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
sym->node_size = H5G_NODE_SIZE(f);
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
sym->node_size = (size_t)(H5G_NODE_SIZE(f));
|
||||
if(NULL == (sym->entry = H5FL_SEQ_CALLOC(H5G_entry_t, (size_t)(2 * H5F_SYM_LEAF_K(f)))))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
|
||||
/* Wrap the local buffer for serialized node info */
|
||||
if(NULL == (wb = H5WB_wrap(node_buf, sizeof(node_buf))))
|
||||
@ -167,12 +167,12 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
|
||||
|
||||
/* magic */
|
||||
if(HDmemcmp(p, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC))
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node signature")
|
||||
p += 4;
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node signature")
|
||||
p += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* version */
|
||||
if(H5G_NODE_VERS != *p++)
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node version")
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node version")
|
||||
|
||||
/* reserved */
|
||||
p++;
|
||||
@ -182,7 +182,7 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
|
||||
|
||||
/* entries */
|
||||
if(H5G__ent_decode_vec(f, &p, sym->entry, sym->nsyms) < 0)
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "unable to decode symbol table entries")
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "unable to decode symbol table entries")
|
||||
|
||||
/* Set return value */
|
||||
ret_value = sym;
|
||||
@ -248,7 +248,7 @@ H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_
|
||||
|
||||
/* magic number */
|
||||
HDmemcpy(p, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
p += 4;
|
||||
p += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* version number */
|
||||
*p++ = H5G_NODE_VERS;
|
||||
|
Loading…
Reference in New Issue
Block a user