From: Marcelo M. <mar...@us...> - 2004-10-10 08:18:24
|
Update of /cvsroot/swig/SWIG/Source/Swig In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18769/Swig Modified Files: stype.c swig.h typesys.c Log Message: add initial C99 complex support + long double Index: stype.c =================================================================== RCS file: /cvsroot/swig/SWIG/Source/Swig/stype.c,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** stype.c 6 Oct 2004 08:26:58 -0000 1.48 --- stype.c 10 Oct 2004 08:18:14 -0000 1.49 *************** *** 116,119 **** --- 116,122 ---- return NewString("double"); break; + case T_COMPLEX: + return NewString("complex"); + break; case T_CHAR: return NewString("char"); Index: swig.h =================================================================== RCS file: /cvsroot/swig/SWIG/Source/Swig/swig.h,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** swig.h 4 Oct 2004 20:21:46 -0000 1.92 --- swig.h 10 Oct 2004 08:18:14 -0000 1.93 *************** *** 73,77 **** #define T_FLOAT 20 #define T_DOUBLE 21 ! #define T_NUMERIC 22 /* non-numeric */ --- 73,82 ---- #define T_FLOAT 20 #define T_DOUBLE 21 ! #define T_LONGDOUBLE 22 ! #define T_FLTCPLX 23 ! #define T_DBLCPLX 24 ! #define T_NUMERIC 25 ! ! #define T_COMPLEX T_DBLCPLX /* non-numeric */ Index: typesys.c =================================================================== RCS file: /cvsroot/swig/SWIG/Source/Swig/typesys.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** typesys.c 7 Oct 2004 02:31:14 -0000 1.17 --- typesys.c 10 Oct 2004 08:18:14 -0000 1.18 *************** *** 16,19 **** --- 16,20 ---- #include "swig.h" + #include "cparse.h" /* ----------------------------------------------------------------------------- *************** *** 1172,1175 **** --- 1173,1180 ---- 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; |