diff options
Diffstat (limited to 'src/H5Oattribute.c')
-rw-r--r-- | src/H5Oattribute.c | 76 |
1 files changed, 39 insertions, 37 deletions
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c index 4a19ed4..fbfc140 100644 --- a/src/H5Oattribute.c +++ b/src/H5Oattribute.c @@ -173,13 +173,13 @@ static htri_t H5O_attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, */ static herr_t H5O_attr_to_dense_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, - unsigned UNUSED sequence, hbool_t *oh_modified, void *_udata/*in,out*/) + unsigned UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/) { H5O_iter_cvt_t *udata = (H5O_iter_cvt_t *)_udata; /* Operator user data */ H5A_t *attr = (H5A_t *)mesg->native; /* Pointer to attribute to insert */ herr_t ret_value = H5_ITER_CONT; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5O_attr_to_dense_cb) + FUNC_ENTER_NOAPI_NOINIT /* check args */ HDassert(oh); @@ -199,7 +199,7 @@ H5O_attr_to_dense_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to convert into null message") /* Indicate that the object header was modified */ - *oh_modified = TRUE; + *oh_modified = H5O_MODIFY_CONDENSE; done: FUNC_LEAVE_NOAPI(ret_value) @@ -226,7 +226,7 @@ H5O_attr_create(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr) htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5O_attr_create) + FUNC_ENTER_NOAPI_NOINIT /* Check arguments */ HDassert(loc); @@ -419,12 +419,12 @@ done: */ static herr_t H5O_attr_open_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence, - hbool_t UNUSED *oh_modified, void *_udata/*in,out*/) + unsigned UNUSED *oh_modified, void *_udata/*in,out*/) { H5O_iter_opn_t *udata = (H5O_iter_opn_t *)_udata; /* Operator user data */ herr_t ret_value = H5_ITER_CONT; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5O_attr_open_cb) + FUNC_ENTER_NOAPI_NOINIT /* check args */ HDassert(oh); @@ -477,7 +477,7 @@ H5O_attr_open_by_name(const H5O_loc_t *loc, const char *name, hid_t dxpl_id) htri_t found_open_attr = FALSE; /* Whether opened object is found */ H5A_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_attr_open_by_name, dxpl_id, loc->addr, NULL) + FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, loc->addr, NULL) /* Check arguments */ HDassert(loc); @@ -527,7 +527,7 @@ H5O_attr_open_by_name(const H5O_loc_t *loc, const char *name, hid_t dxpl_id) /* Check that we found the attribute */ if(!udata.attr) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't locate attribute") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't locate attribute: '%s'", name) /* Get attribute opened from object header */ HDassert(udata.attr); @@ -575,7 +575,7 @@ H5O_attr_open_by_idx_cb(const H5A_t *attr, void *_ret_attr) H5A_t **ret_attr = (H5A_t **)_ret_attr; /* 'User data' passed in */ herr_t ret_value = H5_ITER_STOP; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5O_attr_open_by_idx_cb) + FUNC_ENTER_NOAPI_NOINIT /* check arguments */ HDassert(attr); @@ -619,7 +619,7 @@ H5O_attr_open_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, htri_t found_open_attr = FALSE; /* Whether opened object is found */ H5A_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5O_attr_open_by_idx) + FUNC_ENTER_NOAPI_NOINIT /* Check arguments */ HDassert(loc); @@ -697,7 +697,7 @@ H5O_attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, const char* name_t size_t num_open_attr; /* Number of opened attributes */ htri_t ret_value = FALSE; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5O_attr_find_opened_attr) + FUNC_ENTER_NOAPI_NOINIT /* Get file serial number for the location of attribute */ if(H5F_get_fileno(loc->file, &loc_fnum) < 0) @@ -772,7 +772,7 @@ H5O_attr_update_shared(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5A_t *attr, htri_t shared_mesg; /* Whether the message should be shared */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5O_attr_update_shared) + FUNC_ENTER_NOAPI_NOINIT /* check args */ HDassert(f); @@ -788,7 +788,7 @@ H5O_attr_update_shared(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5A_t *attr, /* Store new version of message as a SOHM */ /* (should always work, since we're not changing the size of the attribute) */ - if((shared_mesg = H5SM_try_share(f, dxpl_id, oh, H5O_ATTR_ID, attr, NULL)) == 0) + if((shared_mesg = H5SM_try_share(f, dxpl_id, oh, 0, H5O_ATTR_ID, attr, NULL)) == 0) HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "attribute changed sharing status") else if(shared_mesg < 0) HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "can't share attribute") @@ -846,14 +846,14 @@ done: */ static herr_t H5O_attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, - unsigned UNUSED sequence, hbool_t *oh_modified, void *_udata/*in,out*/) + unsigned UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/) { H5O_iter_wrt_t *udata = (H5O_iter_wrt_t *)_udata; /* Operator user data */ H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */ hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */ herr_t ret_value = H5_ITER_CONT; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5O_attr_write_cb) + FUNC_ENTER_NOAPI_NOINIT /* check args */ HDassert(oh); @@ -895,7 +895,7 @@ H5O_attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, H5_ITER_ERROR, "unable to update attribute in shared storage") /* Indicate that the object header was modified */ - *oh_modified = TRUE; + *oh_modified = H5O_MODIFY; /* Indicate that the attribute was found */ udata->found = TRUE; @@ -932,7 +932,7 @@ H5O_attr_write(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr) H5O_ainfo_t ainfo; /* Attribute information for object */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5O_attr_write) + FUNC_ENTER_NOAPI_NOINIT /* Check arguments */ HDassert(loc); @@ -1005,12 +1005,12 @@ done: */ static herr_t H5O_attr_rename_chk_cb(H5O_t UNUSED *oh, H5O_mesg_t *mesg/*in,out*/, - unsigned UNUSED sequence, hbool_t UNUSED *oh_modified, void *_udata/*in,out*/) + unsigned UNUSED sequence, unsigned UNUSED *oh_modified, void *_udata/*in,out*/) { H5O_iter_ren_t *udata = (H5O_iter_ren_t *)_udata; /* Operator user data */ herr_t ret_value = H5_ITER_CONT; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_attr_rename_chk_cb) + FUNC_ENTER_NOAPI_NOINIT_NOERR /* check args */ HDassert(oh); @@ -1051,14 +1051,14 @@ H5O_attr_rename_chk_cb(H5O_t UNUSED *oh, H5O_mesg_t *mesg/*in,out*/, */ static herr_t H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, - unsigned UNUSED sequence, hbool_t *oh_modified, void *_udata/*in,out*/) + unsigned UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/) { H5O_iter_ren_t *udata = (H5O_iter_ren_t *)_udata; /* Operator user data */ H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */ hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */ herr_t ret_value = H5_ITER_CONT; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5O_attr_rename_mod_cb) + FUNC_ENTER_NOAPI_NOINIT /* check args */ HDassert(oh); @@ -1125,6 +1125,8 @@ H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, if(H5O_release_mesg(udata->f, udata->dxpl_id, oh, mesg, FALSE) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to release previous attribute") + *oh_modified = H5O_MODIFY_CONDENSE; + /* Append renamed attribute to object header */ /* (Don't let it become shared) */ if(H5O_msg_append_real(udata->f, udata->dxpl_id, oh, H5O_MSG_ATTR, (mesg->flags | H5O_MSG_FLAG_DONTSHARE), 0, attr) < 0) @@ -1139,7 +1141,7 @@ H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, } /* end else */ /* Indicate that the object header was modified */ - *oh_modified = TRUE; + *oh_modified |= H5O_MODIFY; /* Indicate that we found an existing attribute with the old name */ udata->found = TRUE; @@ -1177,7 +1179,7 @@ H5O_attr_rename(const H5O_loc_t *loc, hid_t dxpl_id, const char *old_name, H5O_ainfo_t ainfo; /* Attribute information for object */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_attr_rename, dxpl_id, loc->addr, FAIL) + FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, loc->addr, FAIL) /* Check arguments */ HDassert(loc); @@ -1268,7 +1270,7 @@ H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, hid_t dxpl_id, H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */ herr_t ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_attr_iterate_real, dxpl_id, loc->addr, FAIL) + FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, loc->addr, FAIL) /* Check arguments */ HDassert(loc); @@ -1353,7 +1355,7 @@ H5O_attr_iterate(hid_t loc_id, hid_t dxpl_id, H5G_loc_t loc; /* Object location */ herr_t ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5O_attr_iterate) + FUNC_ENTER_NOAPI_NOINIT /* Check arguments */ HDassert(attr_op); @@ -1398,7 +1400,7 @@ H5O_attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo, H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5O_attr_remove_update) + FUNC_ENTER_NOAPI_NOINIT /* Check arguments */ HDassert(loc); @@ -1511,12 +1513,12 @@ done: */ static herr_t H5O_attr_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, - unsigned UNUSED sequence, hbool_t *oh_modified, void *_udata/*in,out*/) + unsigned UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/) { H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */ herr_t ret_value = H5_ITER_CONT; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5O_attr_remove_cb) + FUNC_ENTER_NOAPI_NOINIT /* check args */ HDassert(oh); @@ -1530,7 +1532,7 @@ H5O_attr_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to convert into null message") /* Indicate that the object header was modified */ - *oh_modified = TRUE; + *oh_modified = H5O_MODIFY_CONDENSE; /* Indicate that this message is the attribute to be deleted */ udata->found = TRUE; @@ -1564,7 +1566,7 @@ H5O_attr_remove(const H5O_loc_t *loc, const char *name, hid_t dxpl_id) htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_attr_remove, dxpl_id, loc->addr, FAIL) + FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, loc->addr, FAIL) /* Check arguments */ HDassert(loc); @@ -1649,7 +1651,7 @@ H5O_attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_attr_remove_by_idx, dxpl_id, loc->addr, FAIL) + FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, loc->addr, FAIL) /* Check arguments */ HDassert(loc); @@ -1737,7 +1739,7 @@ H5O_attr_count_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hsize_t *nattrs) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_attr_count_real, dxpl_id, oh->cache_info.addr, FAIL) + FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, oh->cache_info.addr, FAIL) /* Check arguments */ HDassert(f); @@ -1790,12 +1792,12 @@ done: */ static herr_t H5O_attr_exists_cb(H5O_t UNUSED *oh, H5O_mesg_t *mesg/*in,out*/, - unsigned UNUSED sequence, hbool_t UNUSED *oh_modified, void *_udata/*in,out*/) + unsigned UNUSED sequence, unsigned UNUSED *oh_modified, void *_udata/*in,out*/) { H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */ herr_t ret_value = H5_ITER_CONT; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_attr_exists_cb) + FUNC_ENTER_NOAPI_NOINIT_NOERR /* check args */ HDassert(mesg); @@ -1833,7 +1835,7 @@ H5O_attr_exists(const H5O_loc_t *loc, const char *name, hid_t dxpl_id) H5O_ainfo_t ainfo; /* Attribute information for object */ htri_t ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_attr_exists, dxpl_id, loc->addr, FAIL) + FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, loc->addr, FAIL) /* Check arguments */ HDassert(loc); @@ -1905,7 +1907,7 @@ H5O_attr_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info) H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5O_attr_bh_info, FAIL) + FUNC_ENTER_NOAPI(FAIL) HDassert(f); HDassert(oh); @@ -1988,7 +1990,7 @@ H5O_attr_count(const H5O_loc_t *loc, hid_t dxpl_id) hsize_t nattrs; /* Number of attributes */ int ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5O_attr_count) + FUNC_ENTER_NOAPI_NOINIT /* Check arguments */ HDassert(loc); |