diff options
author | Leo Singer <leo.singer@ligo.org> | 2020-04-02 15:08:08 -0400 |
---|---|---|
committer | Leo Singer <leo.singer@ligo.org> | 2020-06-24 20:21:47 -0400 |
commit | 13260f95b0d35def50f2f4dc9bfe5b04f670fbdd (patch) | |
tree | 9798d4459507491966351337ae31a960950ab012 /Lib/python | |
parent | d967e4c8b8c9b243c472c359fb70bba2136a7d84 (diff) | |
download | swig-13260f95b0d35def50f2f4dc9bfe5b04f670fbdd.tar.gz |
Properly handle C99 complex types even in C++ mode
Use the `_Complex` keyword rather than the `complex` macro.
Fixes #1487.
Diffstat (limited to 'Lib/python')
-rw-r--r-- | Lib/python/ccomplex.i | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/python/ccomplex.i b/Lib/python/ccomplex.i index 28872b985..17163506b 100644 --- a/Lib/python/ccomplex.i +++ b/Lib/python/ccomplex.i @@ -16,11 +16,11 @@ /* C complex constructor */ #define CCplxConst(r, i) ((r) + I*(i)) -%swig_cplxflt_convn(float complex, CCplxConst, creal, cimag); -%swig_cplxdbl_convn(double complex, CCplxConst, creal, cimag); +%swig_cplxflt_convn(float _Complex, CCplxConst, creal, cimag); +%swig_cplxdbl_convn(double _Complex, CCplxConst, creal, cimag); %swig_cplxdbl_convn(complex, CCplxConst, creal, cimag); /* declaring the typemaps */ -%typemaps_primitive(SWIG_TYPECHECK_CPLXFLT, float complex); -%typemaps_primitive(SWIG_TYPECHECK_CPLXDBL, double complex); +%typemaps_primitive(SWIG_TYPECHECK_CPLXFLT, float _Complex); +%typemaps_primitive(SWIG_TYPECHECK_CPLXDBL, double _Complex); %typemaps_primitive(SWIG_TYPECHECK_CPLXDBL, complex); |