From ce0d98b9846fd552e6323bcff0a7ef30c5ccf803 Mon Sep 17 00:00:00 2001 From: q-posev Date: Mon, 20 Sep 2021 15:52:55 +0200 Subject: [PATCH] add conversion of float-like attributes into an output tuple --- src/pytrexio.i | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pytrexio.i b/src/pytrexio.i index 04c0837..14d5730 100644 --- a/src/pytrexio.i +++ b/src/pytrexio.i @@ -28,12 +28,15 @@ Useful when working with C pointers */ %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 num variable is modified by address */ %apply int *OUTPUT { int32_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) */