Properly handle C99 complex types even in C++ mode
Use the `_Complex` keyword rather than the `complex` macro. Fixes #1487.
This commit is contained in:
parent
d967e4c8b8
commit
13260f95b0
6 changed files with 24 additions and 20 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue