summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMark Kittisopikul <mkitti@users.noreply.github.com>2022-12-19 23:13:43 (GMT)
committerGitHub <noreply@github.com>2022-12-19 23:13:43 (GMT)
commitb9244a85d9f1cc5e9bbec61ca73c0cbd9c4cf249 (patch)
tree8c047d5f443217bfa28b77846fa85788e2344b70 /src
parent70cf2c390bc2eef8e57f8fa023341011e2d02d9d (diff)
downloadhdf5-b9244a85d9f1cc5e9bbec61ca73c0cbd9c4cf249.zip
hdf5-b9244a85d9f1cc5e9bbec61ca73c0cbd9c4cf249.tar.gz
hdf5-b9244a85d9f1cc5e9bbec61ca73c0cbd9c4cf249.tar.bz2
Align arg types of H5D_chunk_iter_op_t with H5Dget_chunk_info (#2074)
* Align arg types of H5D_chunk_iter_op_t with H5Dget_chunk_info * Modify chunk_info test to for unsigned / hsize_t types * Fix types in test
Diffstat (limited to 'src')
-rw-r--r--src/H5D.c16
-rw-r--r--src/H5Dchunk.c4
-rw-r--r--src/H5Dpublic.h2
3 files changed, 11 insertions, 11 deletions
diff --git a/src/H5D.c b/src/H5D.c
index d921356..006f4a9 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -2515,18 +2515,18 @@ done:
*
* typedef int (*H5D_chunk_iter_op_t)(
* const hsize_t *offset,
- * uint32_t filter_mask,
+ * unsigned filter_mask,
* haddr_t addr,
- * uint32_t nbytes,
+ * hsize_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.
+ * hsize_t *offset; IN/OUT: Logical position of the chunk’s first element in units of dataset
+ * elements
+ * unsigned filter_mask; IN: Bitmask indicating the filters used when the chunk was written haddr_t
+ * addr; IN: Chunk address in the file
+ * hsize_t; IN: Chunk size in bytes, 0 if the chunk does not exist
+ * 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
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 40f8359..830560d 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -8278,8 +8278,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 ac76bc8..f7d208d 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] -->