Alexandre Julliard : ole32: Remove confusing uses of the __thiscall specifier.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Mar 12 10:48:18 CDT 2015


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Mar 12 14:20:14 2015 +0900

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 8c91a12..b0cd542 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 1c9c447..c45ca2a 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);
 }




More information about the wine-cvs mailing list