OLD | NEW |
(Empty) | |
| 1 /* ----------------------------------------------------------------------------- |
| 2 * See the LICENSE file for information on copyright, usage and redistribution |
| 3 * of SWIG, and the README file for authors - http://www.swig.org/release.html. |
| 4 * |
| 5 * ccomplex.i |
| 6 * |
| 7 * C complex typemaps |
| 8 * ISO C99: 7.3 Complex arithmetic <complex.h> |
| 9 * -----------------------------------------------------------------------------
*/ |
| 10 |
| 11 |
| 12 %include <pycomplex.swg> |
| 13 |
| 14 %{ |
| 15 #include <complex.h> |
| 16 %} |
| 17 |
| 18 |
| 19 /* C complex constructor */ |
| 20 #define CCplxConst(r, i) ((r) + I*(i)) |
| 21 |
| 22 %swig_cplxflt_convn(float complex, CCplxConst, creal, cimag); |
| 23 %swig_cplxdbl_convn(double complex, CCplxConst, creal, cimag); |
| 24 %swig_cplxdbl_convn(complex, CCplxConst, creal, cimag); |
| 25 |
| 26 /* declaring the typemaps */ |
| 27 %typemaps_primitive(SWIG_TYPECHECK_CPLXFLT, float complex); |
| 28 %typemaps_primitive(SWIG_TYPECHECK_CPLXDBL, double complex); |
| 29 %typemaps_primitive(SWIG_TYPECHECK_CPLXDBL, complex); |
OLD | NEW |