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:
Leo Singer 2020-04-02 15:08:08 -04:00
commit 13260f95b0
6 changed files with 24 additions and 20 deletions

View file

@ -1453,9 +1453,9 @@ int SwigType_type(const SwigType *t) {
return T_DOUBLE;
if (strcmp(c, "long double") == 0)
return T_LONGDOUBLE;
if (!cparse_cplusplus && (strcmp(c, "float complex") == 0))
if (!cparse_cplusplus && (strcmp(c, "float _Complex") == 0))
return T_FLTCPLX;
if (!cparse_cplusplus && (strcmp(c, "double complex") == 0))
if (!cparse_cplusplus && (strcmp(c, "double _Complex") == 0))
return T_DBLCPLX;
if (!cparse_cplusplus && (strcmp(c, "complex") == 0))
return T_COMPLEX;