diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2013-07-09 19:55:48 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2013-07-09 19:55:48 (GMT) |
commit | 646341fe4af01a0578cc68aadcbfddb0517511f1 (patch) | |
tree | fc24905a2741a48f9c0ca4eee2222ea143d16a9a | |
parent | 21865ffa5fbaaaf8af7a24034f2db321c32bb946 (diff) | |
download | hdf5-646341fe4af01a0578cc68aadcbfddb0517511f1.zip hdf5-646341fe4af01a0578cc68aadcbfddb0517511f1.tar.gz hdf5-646341fe4af01a0578cc68aadcbfddb0517511f1.tar.bz2 |
[svn-r23878] Port r23859 from trunk to 1.8 branch.
Add const tag to source buffers for H5Dscatter and H5Dgather.
Tested: ummon
-rw-r--r-- | release_docs/RELEASE.txt | 3 | ||||
-rw-r--r-- | src/H5Dpublic.h | 4 | ||||
-rw-r--r-- | src/H5Dscatgath.c | 6 |
3 files changed, 7 insertions, 6 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index b6612dd..6a6d22c 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -97,7 +97,8 @@ Bug Fixes since HDF5-1.8.11 Library ------- - - None + - Added const qualifier to source buffer parameters in H5Dgather and + H5D_scatter_func_t (H5Dscatter callback). (NAF - 2013/7/09) Parallel Library ---------------- diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index 484b176..4309d64 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -108,7 +108,7 @@ typedef herr_t (*H5D_operator_t)(void *elem, hid_t type_id, unsigned ndim, const hsize_t *point, void *operator_data); /* Define the operator function pointer for H5Dscatter() */ -typedef herr_t (*H5D_scatter_func_t)(void **src_buf/*out*/, +typedef herr_t (*H5D_scatter_func_t)(const void **src_buf/*out*/, size_t *src_buf_bytes_used/*out*/, void *op_data); @@ -142,7 +142,7 @@ H5_DLL herr_t H5Dfill(const void *fill, hid_t fill_type, void *buf, H5_DLL herr_t H5Dset_extent(hid_t dset_id, const hsize_t size[]); H5_DLL herr_t H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hid_t dst_space_id, void *dst_buf); -H5_DLL herr_t H5Dgather(hid_t src_space_id, void *src_buf, hid_t type_id, +H5_DLL herr_t H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, size_t dst_buf_size, void *dst_buf, H5D_gather_func_t op, void *op_data); H5_DLL herr_t H5Ddebug(hid_t dset_id); diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c index 60a8800..4b0846f 100644 --- a/src/H5Dscatgath.c +++ b/src/H5Dscatgath.c @@ -925,7 +925,7 @@ H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, H5S_t *dst_space; /* Dataspace */ H5S_sel_iter_t iter; /* Selection iteration info*/ hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */ - void *src_buf = NULL; /* Source (contiguous) data buffer */ + const void *src_buf = NULL; /* Source (contiguous) data buffer */ size_t src_buf_nbytes = 0; /* Size of src_buf */ size_t type_size; /* Datatype element size */ hssize_t nelmts; /* Number of remaining elements in selection */ @@ -1018,8 +1018,8 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Dgather(hid_t src_space_id, void *src_buf, hid_t type_id, size_t dst_buf_size, - void *dst_buf, H5D_gather_func_t op, void *op_data) +H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, + size_t dst_buf_size, void *dst_buf, H5D_gather_func_t op, void *op_data) { H5T_t *type; /* Datatype */ H5S_t *src_space; /* Dataspace */ |