mirror of https://github.com/swig/swig
Handle T_FLTCPLX in NewSwigType()
This fixes an assertion failure and segfault trying to use %constant to deduce the type of a "float _Complex" constant.
This commit is contained in:
parent
3de7c6723e
commit
e5af5dcadb
|
@ -26,6 +26,11 @@
|
|||
#endif
|
||||
%}
|
||||
|
||||
%inline %{
|
||||
static float _Complex CPLX_CONSTANT_ = 0;
|
||||
%}
|
||||
%constant CPLX_CONSTANT = CPLX_CONSTANT_;
|
||||
|
||||
%inline
|
||||
{
|
||||
int has_c99_complex(void) {
|
||||
|
|
|
@ -131,6 +131,8 @@ SwigType *NewSwigType(int t) {
|
|||
return NewString("double");
|
||||
case T_LONGDOUBLE:
|
||||
return NewString("long double");
|
||||
case T_FLTCPLX:
|
||||
return NewString("float _Complex");
|
||||
case T_COMPLEX:
|
||||
return NewString("_Complex");
|
||||
case T_CHAR:
|
||||
|
|
Loading…
Reference in New Issue