From c6c3ccad3661420e0bd1cadb5667e34c5afc983e Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 12 Mar 2015 14:20:14 +0900 Subject: [PATCH] ole32: Remove confusing uses of the __thiscall specifier. --- dlls/ole32/stg_prop.c | 16 +++++----------- dlls/ole32/tests/propvariant.c | 10 ++-------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index 8c91a127f9d..b0cd5425c0d 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -1034,13 +1034,7 @@ static HRESULT PropertyStorage_ReadDictionary(PropertyStorage_impl *This, return hr; } -#ifdef __i386__ -#define __thiscall __stdcall -#else -#define __thiscall __cdecl -#endif - -static __thiscall void* Allocate_CoTaskMemAlloc(void *userdata, ULONG size) +static void* WINAPI Allocate_CoTaskMemAlloc(void *this, ULONG size) { return CoTaskMemAlloc(size); } @@ -1049,7 +1043,7 @@ static __thiscall void* Allocate_CoTaskMemAlloc(void *userdata, ULONG size) * end of the buffer. */ static HRESULT PropertyStorage_ReadProperty(PROPVARIANT *prop, const BYTE *data, - UINT codepage, void* (__thiscall *allocate)(void *userdata, ULONG size), void *allocate_data) + UINT codepage, void* (WINAPI *allocate)(void *this, ULONG size), void *allocate_data) { HRESULT hr = S_OK; @@ -2738,13 +2732,13 @@ end: "jmp *(4*(" #num "))(%eax)" ) DEFINE_STDCALL_WRAPPER(0,Allocate_PMemoryAllocator,8) -extern void* __thiscall Allocate_PMemoryAllocator(void *this, ULONG cbSize); +extern void* WINAPI Allocate_PMemoryAllocator(void *this, ULONG cbSize); #else -static void* __thiscall Allocate_PMemoryAllocator(void *this, ULONG cbSize) +static void* WINAPI Allocate_PMemoryAllocator(void *this, ULONG cbSize) { - void* (__thiscall *fn)(void*,ULONG) = **(void***)this; + void* (WINAPI *fn)(void*,ULONG) = **(void***)this; return fn(this, cbSize); } diff --git a/dlls/ole32/tests/propvariant.c b/dlls/ole32/tests/propvariant.c index 1c9c44732ca..c45ca2af251 100644 --- a/dlls/ole32/tests/propvariant.c +++ b/dlls/ole32/tests/propvariant.c @@ -349,18 +349,12 @@ typedef struct _PMemoryAllocator { struct _PMemoryAllocator_vtable *vt; } PMemoryAllocator; -#ifdef __i386__ -#define __thiscall __stdcall -#else -#define __thiscall __cdecl -#endif - -static void * __thiscall PMemoryAllocator_Allocate(PMemoryAllocator *_this, ULONG cbSize) +static void * WINAPI PMemoryAllocator_Allocate(PMemoryAllocator *_this, ULONG cbSize) { return CoTaskMemAlloc(cbSize); } -static void __thiscall PMemoryAllocator_Free(PMemoryAllocator *_this, void *pv) +static void WINAPI PMemoryAllocator_Free(PMemoryAllocator *_this, void *pv) { CoTaskMemFree(pv); }