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