wine/tools/winapi winapi_parser.pm winapi_loca ...

Alexandre Julliard julliard at wine.codeweavers.com
Fri Nov 4 05:14:41 CST 2005


ChangeSet ID:	21104
CVSROOT:	/opt/cvs-commit
Module name:	wine
Changes by:	julliard at winehq.org	2005/11/04 05:14:41

Modified files:
	tools/winapi   : winapi_parser.pm winapi_local.pm 
	                 winapi_function.pm 

Log message:
	Vincent Béron <vberon at mecano.gme.usherb.ca>
	__RPC_STUB is a calling convention as well (#defined as __stdcall).

Patch: http://cvs.winehq.org/patch.py?id=21104

Old revision  New revision  Changes     Path
 1.5           1.6           +3 -3       wine/tools/winapi/winapi_parser.pm
 1.3           1.4           +2 -2       wine/tools/winapi/winapi_local.pm
 1.2           1.3           +2 -2       wine/tools/winapi/winapi_function.pm

Index: wine/tools/winapi/winapi_parser.pm
diff -u -p wine/tools/winapi/winapi_parser.pm:1.5 wine/tools/winapi/winapi_parser.pm:1.6
--- wine/tools/winapi/winapi_parser.pm:1.5	4 Nov 2005 11:14:41 -0000
+++ wine/tools/winapi/winapi_parser.pm	4 Nov 2005 11:14:41 -0000
@@ -372,7 +372,7 @@ sub parse_c_file($$) {
 	    }
 	    next;
 	} elsif(/(extern\s+|static\s+)?((struct\s+|union\s+|enum\s+|signed\s+|unsigned\s+)?\w+((\s*\*)+\s*|\s+))
-            ((__cdecl|__stdcall|CDECL|NET_API_FUNCTION|RPC_ENTRY|VFWAPIV|VFWAPI|WINAPIV|WINAPI|CALLBACK)\s+)?
+            ((__cdecl|__stdcall|__RPC_STUB|CDECL|NET_API_FUNCTION|RPC_ENTRY|VFWAPIV|VFWAPI|WINAPIV|WINAPI|CALLBACK)\s+)?
 	    (\w+(\(\w+\))?)\s*\((.*?)\)\s*(\{|\;)/sx)
         {
 	    my @lines = split(/\n/, $&);
@@ -448,8 +448,8 @@ sub parse_c_file($$) {
 			((?:struct\s+|union\s+|enum\s+|register\s+|(?:signed\s+|unsigned\s+)
 			  (?:short\s+(?=int)|long\s+(?=int))?)?\w+)\s*
 			((?:const|volatile)?\s*(?:\*\s*(?:const|volatile)?\s*?)*)\s*
-			(?:__cdecl\s+|__stdcall\s+|CALLBACK\s+|CDECL\s+|NET_API_FUNCTION\s+|RPC_ENTRY\s+|STDMETHODCALLTYPE\s+|VFWAPIV\s+|VFWAPI\s+|WINAPIV\s+|WINAPI\s+)?
-			\(\s*(?:__cdecl|__stdcall|CALLBACK|CDECL|NET_API_FUNCTION|RPC_ENTRY|STDMETHODCALLTYPE|VFWAPIV|VFWAPI|WINAPIV|WINAPI)?\s*\*\s*((?:\w+)?)\s*\)\s*
+			(?:__cdecl\s+|__stdcall\s+|__RPC_STUB\s+|CALLBACK\s+|CDECL\s+|NET_API_FUNCTION\s+|RPC_ENTRY\s+|STDMETHODCALLTYPE\s+|VFWAPIV\s+|VFWAPI\s+|WINAPIV\s+|WINAPI\s+)?
+			\(\s*(?:__cdecl|__stdcall|__RPC_STUB|CALLBACK|CDECL|NET_API_FUNCTION|RPC_ENTRY|STDMETHODCALLTYPE|VFWAPIV|VFWAPI|WINAPIV|WINAPI)?\s*\*\s*((?:\w+)?)\s*\)\s*
 			\(\s*(.*?)\s*\)$/x) 
 		{
 		    my $return_type = $1;
Index: wine/tools/winapi/winapi_local.pm
diff -u -p wine/tools/winapi/winapi_local.pm:1.3 wine/tools/winapi/winapi_local.pm:1.4
--- wine/tools/winapi/winapi_local.pm:1.3	4 Nov 2005 11:14:41 -0000
+++ wine/tools/winapi/winapi_local.pm	4 Nov 2005 11:14:41 -0000
@@ -85,7 +85,7 @@ sub _check_function($$$$$$) {
 	    $implemented_calling_convention = "cdecl";
 	} elsif($calling_convention =~ /^(?:VFWAPIV|WINAPIV)$/) {
 	    $implemented_calling_convention = "varargs";
-	} elsif($calling_convention =~ /^(?:__stdcall|NET_API_FUNCTION|RPC_ENTRY|VFWAPI|WINAPI|CALLBACK)$/) {
+	} elsif($calling_convention =~ /^(?:__stdcall|__RPC_STUB|NET_API_FUNCTION|RPC_ENTRY|VFWAPI|WINAPI|CALLBACK)$/) {
 	    if(defined($implemented_return_kind) && $implemented_return_kind =~ /^(?:s_word|word|void)$/) {
 		$implemented_calling_convention = "pascal16";
 	    } else {
@@ -101,7 +101,7 @@ sub _check_function($$$$$$) {
 	    $implemented_calling_convention = "cdecl";
 	} elsif($calling_convention =~ /^(?:VFWAPIV|WINAPIV)$/) {
 	    $implemented_calling_convention = "varargs";
-	} elsif($calling_convention =~ /^(?:__stdcall|NET_API_FUNCTION|RPC_ENTRY|VFWAPI|WINAPI|CALLBACK)$/) {
+	} elsif($calling_convention =~ /^(?:__stdcall|__RPC_STUB|NET_API_FUNCTION|RPC_ENTRY|VFWAPI|WINAPI|CALLBACK)$/) {
 	    if(defined($implemented_return_kind) && $implemented_return_kind eq "longlong") {
 		$implemented_calling_convention = "stdcall"; # FIXME: Check entry flags
 	    } else {
Index: wine/tools/winapi/winapi_function.pm
diff -u -p wine/tools/winapi/winapi_function.pm:1.2 wine/tools/winapi/winapi_function.pm:1.3
--- wine/tools/winapi/winapi_function.pm:1.2	4 Nov 2005 11:14:41 -0000
+++ wine/tools/winapi/winapi_function.pm	4 Nov 2005 11:14:41 -0000
@@ -309,7 +309,7 @@ sub calling_convention16($) {
     } elsif(/^(?:VFWAPIV|WINAPIV)$/) {
 	if(!defined($suffix)) { return undef; }
 	return "pascal$suffix"; # FIXME: Is this correct?
-    } elsif(/^(?:__stdcall|NET_API_FUNCTION|RPC_ENTRY|VFWAPI|WINAPI|CALLBACK)$/) {
+    } elsif(/^(?:__stdcall|__RPC_STUB|NET_API_FUNCTION|RPC_ENTRY|VFWAPI|WINAPI|CALLBACK)$/) {
 	if(!defined($suffix)) { return undef; }
 	return "pascal$suffix";
     } elsif($_ eq "__asm") {
@@ -327,7 +327,7 @@ sub calling_convention32($) {
 	return "cdecl";
     } elsif(/^(?:VFWAPIV|WINAPIV)$/) {
 	return "varargs";
-    } elsif(/^(?:__stdcall|NET_API_FUNCTION|RPC_ENTRY|VFWAPI|WINAPI|CALLBACK)$/) {
+    } elsif(/^(?:__stdcall|__RPC_STUB|NET_API_FUNCTION|RPC_ENTRY|VFWAPI|WINAPI|CALLBACK)$/) {
 	return "stdcall";
     } elsif($_ eq "__asm") {
 	return "asm";



More information about the wine-cvs mailing list