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/H5Oattribute.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/H5Oattribute.c')
-rw-r--r-- | src/H5Oattribute.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c index 5d6d1aa..5e2c4df 100644 --- a/src/H5Oattribute.c +++ b/src/H5Oattribute.c @@ -263,7 +263,7 @@ H5O_attr_create(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr) } /* end else */ /* Was new attribugte shared? */ - if((shared_mesg = H5O_attr_is_shared(attr)) > 0) { + if((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr)) > 0) { hsize_t attr_rc; /* Attribute's ref count in shared message storage */ /* Retrieve ref count for shared attribute */ @@ -524,8 +524,8 @@ H5O_attr_update_shared(H5F_t *f, hid_t dxpl_id, H5A_t *attr, HDassert(attr); /* Extract shared message info from current attribute (for later use) */ - if(NULL == H5O_attr_get_share(attr, &sh_mesg)) - HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "can't get shared info") + if(H5O_shared_copy(&sh_mesg, &(attr->sh_loc)) < 0) + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't get shared message") /* Store new version of message as a SOHM */ /* (should always work, since we're not changing the size of the attribute) */ @@ -557,8 +557,8 @@ H5O_attr_update_shared(H5F_t *f, hid_t dxpl_id, H5A_t *attr, /* Extract updated shared message info from modified attribute, if requested */ if(update_sh_mesg) - if(NULL == H5O_attr_get_share(attr, update_sh_mesg)) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared info") + if(H5O_shared_copy(update_sh_mesg, &(attr->sh_loc)) < 0) + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't get shared message") done: FUNC_LEAVE_NOAPI(ret_value) @@ -785,7 +785,7 @@ H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, } /* end if */ else { /* Sanity check */ - HDassert(H5O_attr_is_shared((H5A_t *)mesg->native) == FALSE); + HDassert(H5O_msg_is_shared(H5O_ATTR_ID, (H5A_t *)mesg->native) == FALSE); /* Check for attribute message changing size */ if(HDstrlen(udata->new_name) != HDstrlen(udata->old_name)) { @@ -831,7 +831,7 @@ H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5_ITER_ERROR, "unable to relocate renamed attribute in header") /* Sanity check */ - HDassert(H5O_attr_is_shared(attr) == FALSE); + HDassert(H5O_msg_is_shared(H5O_ATTR_ID, attr) == FALSE); /* Release the local copy of the attribute */ H5O_msg_free_real(H5O_MSG_ATTR, attr); @@ -1164,7 +1164,7 @@ H5O_attr_remove(const H5O_loc_t *loc, const char *name, hid_t dxpl_id) htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */ /* Check if attribute is shared */ - if((shared_mesg = H5O_attr_is_shared(&(atable.attrs[u]))) < 0) + if((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, &(atable.attrs[u]))) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error determining if message is shared") else if(shared_mesg == 0) { /* Increment reference count on attribute components */ |