diff --git a/src/pytrexio.i b/src/pytrexio.i index 14d5730..1665eb9 100644 --- a/src/pytrexio.i +++ b/src/pytrexio.i @@ -69,23 +69,23 @@ import_array(); %numpy_typemaps(int32_t, NPY_INT32, int64_t) %numpy_typemaps(int64_t, NPY_INT64, int64_t) /* Enable write|read_safe functions to convert numpy arrays from/to double arrays */ -%apply (double* ARGOUT_ARRAY1, int64_t DIM1) {(double * const dset_out, const int64_t dim_out)}; -%apply (double* IN_ARRAY1, int64_t DIM1) {(const double * dset_in, const int64_t dim_in)}; +%apply (double* ARGOUT_ARRAY1, int64_t DIM1) {(double* const dset_out, const int64_t dim_out)}; +%apply (double* IN_ARRAY1, int64_t DIM1) {(const double* dset_in, const int64_t dim_in)}; /* Enable write|read_safe functions to convert numpy arrays from/to float arrays */ -%apply (float* ARGOUT_ARRAY1, int64_t DIM1) {(float * const dset_out, const int64_t dim_out)}; -%apply (float* IN_ARRAY1, int64_t DIM1) {(const float * dset_in, const int64_t dim_in)}; +%apply (float* ARGOUT_ARRAY1, int64_t DIM1) {(float* const dset_out, const int64_t dim_out)}; +%apply (float* IN_ARRAY1, int64_t DIM1) {(const float* dset_in, const int64_t dim_in)}; /* Enable write|read_safe functions to convert numpy arrays from/to int32 arrays */ -%apply (int32_t* ARGOUT_ARRAY1, int64_t DIM1) {(int32_t * const dset_out, const int64_t dim_out)}; -%apply (int32_t* IN_ARRAY1, int64_t DIM1) {(const int32_t * dset_in, const int64_t dim_in)}; +%apply (int32_t* ARGOUT_ARRAY1, int64_t DIM1) {(int32_t* const dset_out, const int64_t dim_out)}; +%apply (int32_t* IN_ARRAY1, int64_t DIM1) {(const int32_t* dset_in, const int64_t dim_in)}; /* Enable write|read_safe functions to convert numpy arrays from/to int64 arrays */ -%apply (int64_t* ARGOUT_ARRAY1, int64_t DIM1) {(int64_t * const dset_out, const int64_t dim_out)}; -%apply (int64_t* IN_ARRAY1, int64_t DIM1) {(const int64_t * dset_in, const int64_t dim_in)}; +%apply (int64_t* ARGOUT_ARRAY1, int64_t DIM1) {(int64_t* const dset_out, const int64_t dim_out)}; +%apply (int64_t* IN_ARRAY1, int64_t DIM1) {(const int64_t* dset_in, const int64_t dim_in)}; /* This tells SWIG to treat char ** dset_in pattern as a special case Enables access to trexio_[...]_write_dset_str set of functions directly, i.e. by converting input list of strings from Python into char ** of C */ -%typemap(in) char ** dset_in { +%typemap(in) char** dset_in { /* Check if is a list */ if (PyList_Check($input)) { int size = PyList_Size($input); @@ -108,7 +108,7 @@ import_array(); } } /* This cleans up the char ** array we malloc-ed before */ -%typemap(freearg) char ** dset_in { +%typemap(freearg) char** dset_in { free((char *) $1); } diff --git a/src/templates_front/templator_front.org b/src/templates_front/templator_front.org index e68f2a4..5a0ecb1 100644 --- a/src/templates_front/templator_front.org +++ b/src/templates_front/templator_front.org @@ -1285,7 +1285,7 @@ trexio_write_$group_num$_32 (trexio_t* const file, const $group_num_dtype_single #+begin_src c :tangle read_attr_num_def_front.c trexio_exit_code -trexio_read_$group_num$ (trexio_t* const file, $group_num_dtype_default$ * const num) +trexio_read_$group_num$ (trexio_t* const file, $group_num_dtype_default$* const num) { return trexio_read_$group_num$_$default_prec$(file, num); } diff --git a/src/templates_hdf5/templator_hdf5.org b/src/templates_hdf5/templator_hdf5.org index 0d29f9d..8ff47d1 100644 --- a/src/templates_hdf5/templator_hdf5.org +++ b/src/templates_hdf5/templator_hdf5.org @@ -156,14 +156,14 @@ trexio_hdf5_deinit (trexio_t* const file) #+begin_src c :tangle hrw_attr_num_hdf5.h :exports none trexio_exit_code trexio_hdf5_has_$group_num$ (trexio_t* const file); -trexio_exit_code trexio_hdf5_read_$group_num$ (trexio_t* const file, $group_num_dtype_double$ * const num); +trexio_exit_code trexio_hdf5_read_$group_num$ (trexio_t* const file, $group_num_dtype_double$* const num); trexio_exit_code trexio_hdf5_write_$group_num$(trexio_t* const file, const $group_num_dtype_double$ num); #+end_src #+begin_src c :tangle read_attr_num_hdf5.c trexio_exit_code -trexio_hdf5_read_$group_num$ (trexio_t* const file, $group_num_dtype_double$ * const num) +trexio_hdf5_read_$group_num$ (trexio_t* const file, $group_num_dtype_double$* const num) { if (file == NULL) return TREXIO_INVALID_ARG_1; diff --git a/src/templates_text/templator_text.org b/src/templates_text/templator_text.org index b3ca571..9f84d87 100644 --- a/src/templates_text/templator_text.org +++ b/src/templates_text/templator_text.org @@ -654,13 +654,13 @@ trexio_text_free_$group$ (trexio_text_t* const file) #+begin_src c :tangle hrw_attr_num_text.h :exports none trexio_exit_code trexio_text_has_$group_num$ (trexio_t* const file); -trexio_exit_code trexio_text_read_$group_num$ (trexio_t* const file, $group_num_dtype_double$ * const num); +trexio_exit_code trexio_text_read_$group_num$ (trexio_t* const file, $group_num_dtype_double$* const num); trexio_exit_code trexio_text_write_$group_num$(trexio_t* const file, const $group_num_dtype_double$ num); #+end_src #+begin_src c :tangle read_attr_num_text.c trexio_exit_code -trexio_text_read_$group_num$ (trexio_t* const file, $group_num_dtype_double$ * const num) +trexio_text_read_$group_num$ (trexio_t* const file, $group_num_dtype_double$* const num) { if (file == NULL) return TREXIO_INVALID_ARG_1;