diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-04-04 22:22:56 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-04-04 22:22:56 (GMT) |
commit | c7d495163419f785a2fe5237991c4ab6e6286091 (patch) | |
tree | ce2bf91d97d9a9290680b4a80295fe1aa1ec5f70 /src/H5Doh.c | |
parent | 2221a9a96e1fc06290ba0bf2e68f9489f071483e (diff) | |
download | hdf5-c7d495163419f785a2fe5237991c4ab6e6286091.zip hdf5-c7d495163419f785a2fe5237991c4ab6e6286091.tar.gz hdf5-c7d495163419f785a2fe5237991c4ab6e6286091.tar.bz2 |
[svn-r29626] Description:
Revise method of invoking object flush callback.
Tested on:
MacOSX/64 10.11.4 (amazon) w/serial & parallel
(h5committest forthcoming)
Diffstat (limited to 'src/H5Doh.c')
-rw-r--r-- | src/H5Doh.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/H5Doh.c b/src/H5Doh.c index 54f7a5e..5cdf4bc 100644 --- a/src/H5Doh.c +++ b/src/H5Doh.c @@ -55,7 +55,7 @@ static void *H5O__dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc, static H5O_loc_t *H5O__dset_get_oloc(hid_t obj_id); static herr_t H5O__dset_bh_info(const H5O_loc_t *loc, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info); -static herr_t H5O__dset_flush(H5G_loc_t *obj_loc, hid_t dxpl_id); +static herr_t H5O__dset_flush(void *_obj_ptr, hid_t dxpl_id); /*********************/ @@ -443,33 +443,27 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5O__dset_flush(H5G_loc_t *obj_loc, hid_t dxpl_id) +H5O__dset_flush(void *_obj_ptr, hid_t dxpl_id) { - H5D_t *dset = NULL; /* Dataset opened */ + H5D_t *dset = (H5D_t *)_obj_ptr; /* Pointer to dataset object */ H5O_type_t obj_type; /* Type of object at location */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC - HDassert(obj_loc); - HDassert(obj_loc->oloc); + HDassert(dset); + HDassert(&dset->oloc); /* Check that the object found is the correct type */ - if(H5O_obj_type(obj_loc->oloc, &obj_type, dxpl_id) < 0) + if(H5O_obj_type(&dset->oloc, &obj_type, dxpl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object type") if(obj_type != H5O_TYPE_DATASET) HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset") - /* Open the dataset */ - if(NULL == (dset = H5D_open(obj_loc, H5P_DATASET_ACCESS_DEFAULT, dxpl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset") - if(H5D__flush_real(dset, dxpl_id) < 0) HDONE_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush cached dataset info") done: - if(dset && H5D_close(dset) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset") FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__dset_flush() */ |