summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMark Kittisopikul <mkitti@users.noreply.github.com>2023-03-29 18:15:58 (GMT)
committerGitHub <noreply@github.com>2023-03-29 18:15:58 (GMT)
commitda9310d08fc3ee9dd8e24f900d0947c51f8a2b00 (patch)
tree567182664f4e57ed92efe5a7e7a9cebe0bebf906 /src
parentabdc160a97c78b01580308fe43204a202d3a6951 (diff)
downloadhdf5-da9310d08fc3ee9dd8e24f900d0947c51f8a2b00.zip
hdf5-da9310d08fc3ee9dd8e24f900d0947c51f8a2b00.tar.gz
hdf5-da9310d08fc3ee9dd8e24f900d0947c51f8a2b00.tar.bz2
Port h5dchunk_iter_hsizet_size #2074 to hdf5_1_12 branch (#2329)
Diffstat (limited to 'src')
-rw-r--r--src/H5D.c26
-rw-r--r--src/H5Dchunk.c4
-rw-r--r--src/H5Dpublic.h2
3 files changed, 3 insertions, 29 deletions
diff --git a/src/H5D.c b/src/H5D.c
index cafa91c..c9c1054 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -1137,32 +1137,6 @@ done:
* H5D_chunk_iter_op_t cb IN: User callback function, called for every chunk.
* void *op_data IN/OUT: Optional user data passed on to user callback.
*
- * Callback information:
- * H5D_chunk_iter_op_t is defined as:
- *
- * typedef int (*H5D_chunk_iter_op_t)(
- * const hsize_t *offset,
- * uint32_t filter_mask,
- * haddr_t addr,
- * uint32_t size,
- * void *op_data);
- *
- * H5D_chunk_iter_op_t parameters:
- * hsize_t *offset; IN/OUT: Array of starting logical coordinates of chunk.
- * uint32_t filter_mask; IN: Filter mask of chunk.
- * haddr_t addr; IN: Offset in file of chunk data.
- * uint32_t nbytes; IN: Size in number of bytes of chunk data in file.
- * void *op_data; IN/OUT: Pointer to any user-defined data
- * associated with the operation.
- *
- * The return values from an operator are:
- * Zero (H5_ITER_CONT) causes the iterator to continue, returning zero when all
- * elements have been processed.
- * Positive (H5_ITER_STOP) causes the iterator to immediately return that positive
- * value, indicating short-circuit success.
- * Negative (H5_ITER_ERROR) causes the iterator to immediately return that value,
- * indicating failure.
- *
* Return: Non-negative on success, negative on failure
*
* Programmer: Gaute Hope
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 216ac44..a0f8371 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -7687,8 +7687,8 @@ H5D__chunk_iter_cb(const H5D_chunk_rec_t *chunk_rec, void *udata)
FUNC_ENTER_PACKAGE_NOERR
/* Check for callback failure and pass along return value */
- if ((ret_value = (data->op)(offset, chunk_rec->filter_mask, chunk_rec->chunk_addr, chunk_rec->nbytes,
- data->op_data)) < 0)
+ if ((ret_value = (data->op)(offset, (unsigned)chunk_rec->filter_mask, chunk_rec->chunk_addr,
+ (hsize_t)chunk_rec->nbytes, data->op_data)) < 0)
HERROR(H5E_DATASET, H5E_CANTNEXT, "iteration operator failed");
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h
index e0533b3..22e856d 100644
--- a/src/H5Dpublic.h
+++ b/src/H5Dpublic.h
@@ -238,7 +238,7 @@ typedef herr_t (*H5D_gather_func_t)(const void *dst_buf, size_t dst_buf_bytes_us
* \li A negative (#H5_ITER_ERROR) causes the iterator to immediately
* return that value, indicating failure.
*/
-typedef int (*H5D_chunk_iter_op_t)(const hsize_t *offset, uint32_t filter_mask, haddr_t addr, uint32_t size,
+typedef int (*H5D_chunk_iter_op_t)(const hsize_t *offset, unsigned filter_mask, haddr_t addr, hsize_t size,
void *op_data);
//! <!-- [H5D_chunk_iter_op_t_snip] -->