Commit fbd6126a authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Try complex.i: compiles, doesn't work

parent 1095049c
Pipeline #39428 failed with stage
in 12 seconds
%module "libcerf"
/* Convert from Python --> C */
%typemap(in) _cerf_cmplx {
$1 = ((Py_complex*)$input)->real + _Complex_I * ((Py_complex*)$input)->imag;
}
/* Convert from C --> Python */
%typemap(out) int {
$result = Py_complex(creal($1), cimag($1));
}
%{
#include "lib/cerf.h"
%}
%include <complex.i>
%include "lib/cerf.h"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment