Rob Shearman : widl: Support __fastcall and __pascal calling conventions.

Alexandre Julliard julliard at winehq.org
Wed Apr 2 16:36:17 CDT 2008


Module: wine
Branch: master
Commit: 35ba23bd48b718c22dec69e047405d6156d875dd
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=35ba23bd48b718c22dec69e047405d6156d875dd

Author: Rob Shearman <rob at codeweavers.com>
Date:   Wed Apr  2 12:56:21 2008 +0100

widl: Support __fastcall and __pascal calling conventions.

Support the synonyms for these and existing calling conventions.

---

 tools/widl/parser.l |    8 ++++++++
 tools/widl/parser.y |    4 ++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/tools/widl/parser.l b/tools/widl/parser.l
index 3bcdc26..66110b6 100644
--- a/tools/widl/parser.l
+++ b/tools/widl/parser.l
@@ -186,13 +186,19 @@ static const struct keyword keywords[] = {
 	{"FALSE",			tFALSE},
 	{"TRUE",			tTRUE},
 	{"__cdecl",			tCDECL},
+	{"__fastcall",			tFASTCALL},
+	{"__pascal",			tPASCAL},
 	{"__int64",			tINT64},
 	{"__stdcall",			tSTDCALL},
+	{"_cdecl",			tCDECL},
+	{"_fastcall",			tFASTCALL},
+	{"_pascal",			tPASCAL},
 	{"_stdcall",			tSTDCALL},
 	{"boolean",			tBOOLEAN},
 	{"byte",			tBYTE},
 	{"callback",			tCALLBACK},
 	{"case",			tCASE},
+	{"cdecl",			tCDECL},
 	{"char",			tCHAR},
 	{"coclass",			tCOCLASS},
 	{"code",			tCODE},
@@ -217,11 +223,13 @@ static const struct keyword keywords[] = {
 	{"long",			tLONG},
 	{"methods",			tMETHODS},
 	{"module",			tMODULE},
+	{"pascal",			tPASCAL},
 	{"properties",			tPROPERTIES},
 	{"short",			tSHORT},
 	{"signed",			tSIGNED},
 	{"sizeof",			tSIZEOF},
         {"small",			tSMALL},
+	{"stdcall",			tSTDCALL},
 	{"struct",			tSTRUCT},
 	{"switch",			tSWITCH},
 	{"typedef",			tTYPEDEF},
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 685322a..155e026 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -181,6 +181,7 @@ static void check_all_user_types(ifref_list_t *ifaces);
 %token tENTRY tENUM tERRORSTATUST
 %token tEXPLICITHANDLE tEXTERN
 %token tFALSE
+%token tFASTCALL
 %token tFLOAT
 %token tHANDLE
 %token tHANDLET
@@ -208,6 +209,7 @@ static void check_all_user_types(ifref_list_t *ifaces);
 %token tOBJECT tODL tOLEAUTOMATION
 %token tOPTIONAL
 %token tOUT
+%token tPASCAL
 %token tPOINTERDEFAULT
 %token tPROPERTIES
 %token tPROPGET tPROPPUT tPROPPUTREF
@@ -520,6 +522,8 @@ uuid_string:
         ;
 
 callconv: tCDECL				{ $$ = $<str>1; }
+	| tFASTCALL				{ $$ = $<str>1; }
+	| tPASCAL				{ $$ = $<str>1; }
 	| tSTDCALL				{ $$ = $<str>1; }
 	;
 




More information about the wine-cvs mailing list