src/h5core/h5file
src/h5core/h5b_io.h: - define args as const where possible
This commit is contained in:
+22
-22
@@ -64,7 +64,7 @@ h5_get_hdf5_file(
|
||||
static herr_t
|
||||
hdf5_error_handler (
|
||||
hid_t estack_id,
|
||||
void* __f
|
||||
void* __f
|
||||
) {
|
||||
UNUSED_ARGUMENT (__f);
|
||||
if (h5_get_loglevel() >= 5) {
|
||||
@@ -167,10 +167,10 @@ set_alignment (
|
||||
|
||||
static inline h5_err_t
|
||||
set_default_file_props (
|
||||
h5_prop_file_t* _props
|
||||
h5_prop_file_t* const _props
|
||||
) {
|
||||
H5_INLINE_FUNC_ENTER (h5_err_t);
|
||||
h5_prop_file_p props = (h5_prop_file_p)_props;
|
||||
h5_prop_file_t* props = (h5_prop_file_t*)_props;
|
||||
bzero (props, sizeof (*props));
|
||||
props->class = H5_PROP_FILE;
|
||||
TRY (props->prefix_step_name = h5_calloc (1, H5_STEPNAME_LEN));
|
||||
@@ -188,7 +188,7 @@ h5_set_prop_file_mpio_collective (
|
||||
h5_prop_t _props,
|
||||
MPI_Comm* comm
|
||||
) {
|
||||
h5_prop_file_p props = (h5_prop_file_p)_props;
|
||||
h5_prop_file_t* props = (h5_prop_file_t*)_props;
|
||||
H5_CORE_API_ENTER (h5_err_t, "props=%p, comm=%p", props, comm);
|
||||
|
||||
if (props->class != H5_PROP_FILE) {
|
||||
@@ -214,7 +214,7 @@ h5_set_prop_file_mpio_independent (
|
||||
h5_prop_t _props,
|
||||
MPI_Comm* comm
|
||||
) {
|
||||
h5_prop_file_p props = (h5_prop_file_p)_props;
|
||||
h5_prop_file_t* props = (h5_prop_file_t*)_props;
|
||||
H5_CORE_API_ENTER (h5_err_t, "props=%p, comm=%p", props, comm);
|
||||
|
||||
if (props->class != H5_PROP_FILE) {
|
||||
@@ -236,7 +236,7 @@ h5_set_prop_file_mpio_posix (
|
||||
h5_prop_t _props,
|
||||
MPI_Comm* comm
|
||||
) {
|
||||
h5_prop_file_p props = (h5_prop_file_p)_props;
|
||||
h5_prop_file_t* props = (h5_prop_file_t*)_props;
|
||||
H5_CORE_API_ENTER (h5_err_t, "props=%p, comm=%p", props, comm);
|
||||
|
||||
if (props->class != H5_PROP_FILE) {
|
||||
@@ -256,9 +256,9 @@ h5_set_prop_file_mpio_posix (
|
||||
h5_err_t
|
||||
h5_set_prop_file_core_vfd (
|
||||
h5_prop_t _props,
|
||||
h5_int64_t increment
|
||||
const h5_int64_t increment
|
||||
) {
|
||||
h5_prop_file_p props = (h5_prop_file_p)_props;
|
||||
h5_prop_file_t* props = (h5_prop_file_t*)_props;
|
||||
H5_CORE_API_ENTER (h5_err_t, "props=%p, increment=%lld", props, (long long int)increment);
|
||||
|
||||
if (props->class != H5_PROP_FILE) {
|
||||
@@ -283,9 +283,9 @@ h5_set_prop_file_core_vfd (
|
||||
h5_err_t
|
||||
h5_set_prop_file_align (
|
||||
h5_prop_t _props,
|
||||
h5_int64_t align
|
||||
const h5_int64_t align
|
||||
) {
|
||||
h5_prop_file_p props = (h5_prop_file_p)_props;
|
||||
h5_prop_file_t* props = (h5_prop_file_t*)_props;
|
||||
H5_CORE_API_ENTER (
|
||||
h5_err_t,
|
||||
"props=%p, align=%lld",
|
||||
@@ -304,9 +304,9 @@ h5_set_prop_file_align (
|
||||
h5_err_t
|
||||
h5_set_prop_file_throttle (
|
||||
h5_prop_t _props,
|
||||
h5_int64_t throttle
|
||||
const h5_int64_t throttle
|
||||
) {
|
||||
h5_prop_file_p props = (h5_prop_file_p)_props;
|
||||
h5_prop_file_t* props = (h5_prop_file_t*)_props;
|
||||
H5_CORE_API_ENTER (
|
||||
h5_err_t,
|
||||
"props=%p, throttle=%lld",
|
||||
@@ -343,7 +343,7 @@ h5_set_prop_file_throttle (
|
||||
|
||||
h5_prop_t
|
||||
h5_create_prop (
|
||||
h5_int64_t class
|
||||
const h5_int64_t class
|
||||
) {
|
||||
H5_CORE_API_ENTER (
|
||||
h5_prop_t,
|
||||
@@ -391,7 +391,7 @@ static inline h5_err_t
|
||||
open_file (
|
||||
const h5_file_p f,
|
||||
const char* const filename,
|
||||
h5_int32_t mode
|
||||
const h5_int32_t mode
|
||||
) {
|
||||
H5_INLINE_FUNC_ENTER (h5_err_t);
|
||||
h5_info ("Opening file %s.", filename);
|
||||
@@ -463,11 +463,11 @@ open_file (
|
||||
|
||||
h5_file_t
|
||||
h5_open_file2 (
|
||||
const char* filename,
|
||||
h5_int32_t mode,
|
||||
h5_prop_t props_
|
||||
const char* const filename,
|
||||
const h5_int32_t mode,
|
||||
const h5_prop_t props_
|
||||
) {
|
||||
h5_prop_file_t* props = (h5_prop_file_t*)props_;
|
||||
h5_prop_file_t* const props = (h5_prop_file_t*)props_;
|
||||
H5_CORE_API_ENTER (h5_file_t,
|
||||
"filename='%s', mode=%d, props=%p",
|
||||
filename, mode, props);
|
||||
@@ -525,7 +525,7 @@ h5_open_file1 (
|
||||
const char* filename,
|
||||
h5_int32_t mode,
|
||||
MPI_Comm comm,
|
||||
h5_size_t align
|
||||
const h5_size_t align
|
||||
) {
|
||||
H5_CORE_API_ENTER (
|
||||
h5_file_p,
|
||||
@@ -648,9 +648,9 @@ h5_set_stepname_fmt (
|
||||
h5_err_t
|
||||
h5_get_stepname_fmt (
|
||||
const h5_file_t f_, /*!< Handle to file */
|
||||
char* name, /*!< OUT: Prefix */
|
||||
int l_name, /*!< length of buffer name */
|
||||
int* width /*!< OUT: Width of the number */
|
||||
char* const name, /*!< OUT: Prefix */
|
||||
const int l_name, /*!< length of buffer name */
|
||||
int* const width /*!< OUT: Width of the number */
|
||||
) {
|
||||
h5_file_p f = (h5_file_p)f_;
|
||||
UNUSED_ARGUMENT (f);
|
||||
|
||||
+21
-20
@@ -17,6 +17,7 @@
|
||||
#include "private/h5b_model.h"
|
||||
|
||||
#include "h5core/h5_syscall.h"
|
||||
#include "h5core/h5b_io.h"
|
||||
|
||||
/*!
|
||||
\ingroup h5_private
|
||||
@@ -246,9 +247,9 @@ _write_data (
|
||||
h5_err_t
|
||||
h5b_write_scalar_data (
|
||||
const h5_file_t fh, /*!< IN: file handle */
|
||||
const char *field_name, /*!< IN: name of field */
|
||||
const void *data, /*!< IN: data to write */
|
||||
const hid_t type /*!< IN: data type */
|
||||
const char* const field_name, /*!< IN: name of field */
|
||||
const void* const data, /*!< IN: data to write */
|
||||
const h5_types_t type /*!< IN: data type */
|
||||
) {
|
||||
h5_file_p f = (h5_file_p)fh;
|
||||
H5_CORE_API_ENTER (h5_err_t,
|
||||
@@ -268,11 +269,11 @@ h5b_write_scalar_data (
|
||||
h5_err_t
|
||||
h5b_write_vector3d_data (
|
||||
const h5_file_t fh, /*!< IN: file handle */
|
||||
const char *field_name, /*!< IN: name of field */
|
||||
const void *xdata, /*!< IN: x data to write */
|
||||
const void *ydata, /*!< IN: y data to write */
|
||||
const void *zdata, /*!< IN: z data to write */
|
||||
const hid_t type /*!< IN: data type */
|
||||
const char* const field_name, /*!< IN: name of field */
|
||||
const void* const xdata, /*!< IN: x data to write */
|
||||
const void* const ydata, /*!< IN: y data to write */
|
||||
const void* const zdata, /*!< IN: z data to write */
|
||||
const h5_types_t type /*!< IN: data type */
|
||||
) {
|
||||
h5_file_p f = (h5_file_p)fh;
|
||||
H5_CORE_API_ENTER (h5_err_t,
|
||||
@@ -378,8 +379,8 @@ _select_hyperslab_for_reading (
|
||||
static h5_err_t
|
||||
read_data (
|
||||
const h5_file_p f, /*!< IN: file handle */
|
||||
const char *dataset_name, /*!< IN: name of dataset */
|
||||
void *data, /*!< OUT: ptr to read buffer */
|
||||
const char* const dataset_name, /*!< IN: name of dataset */
|
||||
void* const data, /*!< OUT: ptr to read buffer */
|
||||
const hid_t type /*!< IN: data type */
|
||||
) {
|
||||
H5_PRIV_FUNC_ENTER (h5_err_t,
|
||||
@@ -406,10 +407,10 @@ read_data (
|
||||
|
||||
h5_err_t
|
||||
h5b_read_scalar_data (
|
||||
const h5_file_p fh, /*!< IN: file handle */
|
||||
const char *field_name, /*!< IN: name of field */
|
||||
void *data, /*!< OUT: read bufer */
|
||||
const hid_t type /*!< IN: data type */
|
||||
const h5_file_t fh, /*!< IN: file handle */
|
||||
const char* const field_name, /*!< IN: name of field */
|
||||
void* const data, /*!< OUT: read bufer */
|
||||
const h5_types_t type /*!< IN: data type */
|
||||
) {
|
||||
h5_file_p f = (h5_file_p)fh;
|
||||
H5_CORE_API_ENTER (h5_err_t,
|
||||
@@ -426,12 +427,12 @@ h5b_read_scalar_data (
|
||||
|
||||
h5_err_t
|
||||
h5b_read_vector3d_data (
|
||||
const h5_file_p fh, /*!< IN: file handle */
|
||||
const char *field_name, /*!< IN: name of field */
|
||||
void *xdata, /*!< IN: x data to write */
|
||||
void *ydata, /*!< IN: y data to write */
|
||||
void *zdata, /*!< IN: z data to write */
|
||||
const hid_t type /*!< IN: data type */
|
||||
const h5_file_t fh, /*!< IN: file handle */
|
||||
const char* const field_name, /*!< IN: name of field */
|
||||
void* const xdata, /*!< IN: x data to write */
|
||||
void* const ydata, /*!< IN: y data to write */
|
||||
void* const zdata, /*!< IN: z data to write */
|
||||
const h5_types_t type /*!< IN: data type */
|
||||
) {
|
||||
h5_file_p f = (h5_file_p)fh;
|
||||
H5_CORE_API_ENTER (h5_err_t,
|
||||
|
||||
Reference in New Issue
Block a user