mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-11-03 20:54:07 +01:00
remove blank spaces in front of pointers
This commit is contained in:
parent
788f7e666d
commit
d1a9af4185
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user