From 67f1d7c41dba8614a5aedc471bbffb5372d75953 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Thu, 13 Oct 2005 09:23:20 +0000 Subject: [PATCH] add more support for wchar git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7647 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/CParse/cscanner.c | 4 ++++ SWIG/Source/Swig/swig.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/SWIG/Source/CParse/cscanner.c b/SWIG/Source/CParse/cscanner.c index 91c170e36..366f111ef 100644 --- a/SWIG/Source/CParse/cscanner.c +++ b/SWIG/Source/CParse/cscanner.c @@ -1100,6 +1100,10 @@ int yylex(void) { yylval.type = NewSwigType(T_CHAR); return(TYPE_CHAR); } + if (strcmp(yytext,"wchar_t") == 0) { + yylval.type = NewSwigType(T_WCHAR); + return(TYPE_WCHAR); + } if (strcmp(yytext,"short") == 0) { yylval.type = NewSwigType(T_SHORT); return(TYPE_SHORT); diff --git a/SWIG/Source/Swig/swig.h b/SWIG/Source/Swig/swig.h index 75e7fd809..65238f0b8 100644 --- a/SWIG/Source/Swig/swig.h +++ b/SWIG/Source/Swig/swig.h @@ -81,7 +81,8 @@ typedef DOH SwigType; /* non-numeric */ -#define T_CHAR 30 +#define T_CHAR 29 +#define T_WCHAR 30 #define T_USER 31 #define T_VOID 32 #define T_STRING 33