diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-06-27 15:44:50 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-06-27 15:44:50 (GMT) |
commit | 0fe43fbf2cd56f142ec322daca2a669fac8243ed (patch) | |
tree | f01427e9de3133b822475e1aeb3c73ad21a4ec1f /src/H5Dint.c | |
parent | 7320a66aa7224549c308132a796cef325d377116 (diff) | |
parent | a4dc3ff34d2dec4db339851df381b67970853f2a (diff) | |
download | hdf5-0fe43fbf2cd56f142ec322daca2a669fac8243ed.zip hdf5-0fe43fbf2cd56f142ec322daca2a669fac8243ed.tar.gz hdf5-0fe43fbf2cd56f142ec322daca2a669fac8243ed.tar.bz2 |
[svn-r23834] merge from trunk up to r23833.
Fixed several conflicts, mostly because calling API routines internally was removed from several places in the trunk.
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r-- | src/H5Dint.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c index ee7cc83..f2b70e7 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -379,7 +379,7 @@ H5D__get_dxpl_cache(hid_t dxpl_id, H5D_dxpl_cache_t **cache) FUNC_ENTER_PACKAGE /* Check args */ - assert(cache); + HDassert(cache); /* Check for the default DXPL */ if(dxpl_id==H5P_DATASET_XFER_DEFAULT) @@ -2052,6 +2052,7 @@ H5D__vlen_get_buf_size(void UNUSED *elem, hid_t type_id, unsigned UNUSED ndim, c { H5D_vlen_bufsize_t *vlen_bufsize = (H5D_vlen_bufsize_t *)op_data; H5T_t *dt; /* Datatype for operation */ + H5S_t *fspace; /* File dataspace for operation */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2061,19 +2062,24 @@ H5D__vlen_get_buf_size(void UNUSED *elem, hid_t type_id, unsigned UNUSED ndim, c /* Check args */ if(NULL == (dt = (H5T_t *)H5I_object(type_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a datatype") /* Make certain there is enough fixed-length buffer available */ if(NULL == (vlen_bufsize->fl_tbuf = H5FL_BLK_REALLOC(vlen_fl_buf, vlen_bufsize->fl_tbuf, H5T_get_size(dt)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't resize tbuf") + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't resize tbuf") /* Select point to read in */ - if(H5Sselect_elements(vlen_bufsize->fspace_id, H5S_SELECT_SET, (size_t)1, point) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't select point") + if(NULL == (fspace = (H5S_t *)H5I_object_verify(vlen_bufsize->fspace_id, H5I_DATASPACE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + if(H5S_select_elements(fspace, H5S_SELECT_SET, (size_t)1, point) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "can't select point") /* Read in the point (with the custom VL memory allocator) */ - if(H5Dread(vlen_bufsize->dataset_id, type_id, vlen_bufsize->mspace_id, vlen_bufsize->fspace_id, vlen_bufsize->xfer_pid, vlen_bufsize->fl_tbuf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read point") + if(H5VL_dataset_read(vlen_bufsize->dset, vlen_bufsize->vol_plugin, + type_id, vlen_bufsize->mspace_id, + vlen_bufsize->fspace_id, vlen_bufsize->xfer_pid, + vlen_bufsize->fl_tbuf, H5_EVENT_QUEUE_NULL) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data") done: FUNC_LEAVE_NOAPI(ret_value) |