1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-12-22 20:35:44 +01:00

add conversion of float-like attributes into an output tuple

This commit is contained in:
q-posev 2021-09-20 15:52:55 +02:00
parent 2497a80f90
commit ce0d98b984

View File

@ -28,12 +28,15 @@
Useful when working with C pointers Useful when working with C pointers
*/ */
%include typemaps.i %include typemaps.i
/* Redefine the int32_t* and int64_t* num to be output /* Redefine the [int32_t*, int64_t*, float*, double*] num
pattern to be appended to the output tuple.
Useful for TREXIO read_num functions where the Useful for TREXIO read_num functions where the
num variable is modified by address num variable is modified by address
*/ */
%apply int *OUTPUT { int32_t* const num}; %apply int *OUTPUT { int32_t* const num};
%apply int *OUTPUT { int64_t* const num}; %apply int *OUTPUT { int64_t* const num};
%apply float *OUTPUT { float* const num};
%apply float *OUTPUT { double* const num};
/* Does not work for arrays (SIGSEGV) */ /* Does not work for arrays (SIGSEGV) */