Subject: Re: [msysGit] [PATCH 07/14] Fix __stdcall/WINAPI placement and function prototype

From: Marius Storm-Olsen <[email-masked]>
Date: Fri, 21 Aug 2009 21:42:44 +0200

Johannes Sixt said the following on 21.08.2009 19:37:
> On Freitag, 21. August 2009, Marius Storm-Olsen wrote:
>> -static __stdcall unsigned ticktack(void *dummy)
>> +static unsigned WINAPI ticktack(void *dummy)
> 
>> -static __stdcall unsigned run_thread(void *data)
>> +static unsigned WINAPI run_thread(void *data)
> 
> These two are not nice. As I said in an earlier mail: The
> documentation says that the thread function pointer that is passed to
> _beginthreadex must have __stdcall calling convention. Therefore, you
> should not change these to WINAPI.

WINAPI is just a define for __stdcall (since _MSC_VER >= 800 anyways; VC 
6.0 being _MSC_VER == 1200), and won't change.

So, IMO the change is not bad, and makes things less convoluted by using 
the same convention all over.

(And _beginthreadex actually accepts both __stdcall and __clrcall 
calling conventions.)

--
.marius