From c1e79cd94dfcebabd192dc187296f216da0e68a8 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/SWIG@7647 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/CParse/cscanner.c | 4 ++++ Source/Swig/swig.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/CParse/cscanner.c b/Source/CParse/cscanner.c index 91c170e36..366f111ef 100644 --- a/Source/CParse/cscanner.c +++ b/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/Source/Swig/swig.h b/Source/Swig/swig.h index 75e7fd809..65238f0b8 100644 --- a/Source/Swig/swig.h +++ b/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