diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-02-04 07:37:15 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-02-04 07:37:15 (GMT) |
commit | 0a8bba91530eb333e7d3f17e18aac12db44eda63 (patch) | |
tree | 9b6cf88bc5113878ddeca5facadc1c3347ba0654 /src/H5Adense.c | |
parent | f555ac654b71f0bcaab99775f8c2fe1dac26bfab (diff) | |
download | hdf5-0a8bba91530eb333e7d3f17e18aac12db44eda63.zip hdf5-0a8bba91530eb333e7d3f17e18aac12db44eda63.tar.gz hdf5-0a8bba91530eb333e7d3f17e18aac12db44eda63.tar.bz2 |
[svn-r13232] Description:
Remove the "scaffolding" for shared message method invocation and
simplify the way shared messages are dealt with in general.
Tested on:
FreeBSD/32 6.2 (duty)
Mac OS X/32 10.4.8 (amazon)
Diffstat (limited to 'src/H5Adense.c')
-rw-r--r-- | src/H5Adense.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/H5Adense.c b/src/H5Adense.c index 30229f4..b630166 100644 --- a/src/H5Adense.c +++ b/src/H5Adense.c @@ -388,7 +388,6 @@ H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_t *oh, H5A_t *attr) H5A_bt2_ud_ins_t udata; /* User data for v2 B-tree insertion */ H5HF_t *fheap = NULL; /* Fractal heap handle for attributes */ H5HF_t *shared_fheap = NULL; /* Fractal heap handle for shared header messages */ - H5O_shared_t sh_mesg; /* Shared object header message */ uint8_t attr_buf[H5A_ATTR_BUF_SIZE]; /* Buffer for serializing message */ void *attr_ptr = NULL; /* Pointer to serialized message */ unsigned mesg_flags = 0; /* Flags for storing message */ @@ -414,7 +413,7 @@ H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_t *oh, H5A_t *attr) htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */ /* Check if message is already shared */ - if((shared_mesg = H5O_attr_is_shared(attr)) < 0) + if((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error determining if message is shared") else if(shared_mesg > 0) /* Mark the message as shared */ @@ -449,12 +448,8 @@ H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_t *oh, H5A_t *attr) /* Sanity check */ HDassert(attr_sharable); - /* Get the shared information for the attribute */ - if(NULL == H5O_attr_get_share(attr, &sh_mesg)) - HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "can't get shared message") - /* Use heap ID for shared message heap */ - udata.id = sh_mesg.u.heap_id; + udata.id = attr->sh_loc.u.heap_id; } /* end if */ else { size_t attr_size; /* Size of serialized attribute in the heap */ @@ -805,7 +800,7 @@ H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_t *oh, const char *old_name, HDassert(attr_copy); /* Check if message is already shared */ - if((shared_mesg = H5O_attr_is_shared(attr_copy)) < 0) + if((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr_copy)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error determining if message is shared") else if(shared_mesg > 0) { /* Reset shared status of copy */ @@ -823,7 +818,7 @@ H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_t *oh, const char *old_name, HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to add to dense storage") /* Was this attribute shared? */ - if((shared_mesg = H5O_attr_is_shared(attr_copy)) > 0) { + if((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr_copy)) > 0) { hsize_t attr_rc; /* Attribute's ref count in shared message storage */ /* Retrieve ref count for shared attribute */ |