add initial C99 complex support + long double

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6384 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-10 08:18:14 +00:00
commit 2459ec99d1
5 changed files with 36 additions and 3 deletions

View file

@ -115,6 +115,9 @@ SwigType *NewSwigType(int t) {
case T_DOUBLE:
return NewString("double");
break;
case T_COMPLEX:
return NewString("complex");
break;
case T_CHAR:
return NewString("char");
break;

View file

@ -72,7 +72,12 @@ typedef DOH SwigType;
#define T_ULONGLONG 12
#define T_FLOAT 20
#define T_DOUBLE 21
#define T_NUMERIC 22
#define T_LONGDOUBLE 22
#define T_FLTCPLX 23
#define T_DBLCPLX 24
#define T_NUMERIC 25
#define T_COMPLEX T_DBLCPLX
/* non-numeric */

View file

@ -15,6 +15,7 @@
char cvsroot_typesys_c[] = "$Header$";
#include "swig.h"
#include "cparse.h"
/* -----------------------------------------------------------------------------
* Synopsis
@ -1171,6 +1172,10 @@ int SwigType_type(SwigType *t)
if (strcmp(c,"unsigned char") == 0) return T_UCHAR;
if (strcmp(c,"float") == 0) return T_FLOAT;
if (strcmp(c,"double") == 0) return T_DOUBLE;
if (strcmp(c,"long double") == 0) return T_LONGDOUBLE;
if (!cparse_cplusplus && (strcmp(c,"float complex") == 0)) return T_FLTCPLX;
if (!cparse_cplusplus && (strcmp(c,"double complex") == 0)) return T_DBLCPLX;
if (!cparse_cplusplus && (strcmp(c,"complex") == 0)) return T_COMPLEX;
if (strcmp(c,"void") == 0) return T_VOID;
if (strcmp(c,"bool") == 0) return T_BOOL;
if (strcmp(c,"long long") == 0) return T_LONGLONG;