Rob Shearman : Change parameter type from size_t to SIZE_T for MIDL_user_allocate.

Alexandre Julliard julliard at winehq.org
Mon Feb 2 09:01:10 CST 2009


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

Author: Rob Shearman <robertshearman at gmail.com>
Date:   Fri Jan 30 13:46:17 2009 +0000

Change parameter type from size_t to SIZE_T for MIDL_user_allocate.

---

 dlls/advapi32/service.c          |    2 +-
 dlls/ole32/moniker.c             |    2 +-
 dlls/rpcrt4/ndr_ole.c            |    2 +-
 dlls/rpcrt4/rpc_epmap.c          |    2 +-
 dlls/rpcrt4/tests/cstub.c        |    2 +-
 dlls/rpcrt4/tests/ndr_marshall.c |    2 +-
 dlls/rpcrt4/tests/server.c       |    2 +-
 include/rpcndr.h                 |   14 +++++++-------
 programs/rpcss/irotp.c           |    2 +-
 programs/services/rpc.c          |    2 +-
 tools/widl/header.c              |    2 +-
 11 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c
index a107397..a76c27b 100644
--- a/dlls/advapi32/service.c
+++ b/dlls/advapi32/service.c
@@ -49,7 +49,7 @@ static const WCHAR szServiceManagerKey[] = { 'S','y','s','t','e','m','\\',
       'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
       'S','e','r','v','i','c','e','s',0 };
 
-void  __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t len)
+void  __RPC_FAR * __RPC_USER MIDL_user_allocate(SIZE_T len)
 {
     return HeapAlloc(GetProcessHeap(), 0, len);
 }
diff --git a/dlls/ole32/moniker.c b/dlls/ole32/moniker.c
index 68a4cc6..db07566 100644
--- a/dlls/ole32/moniker.c
+++ b/dlls/ole32/moniker.c
@@ -1660,7 +1660,7 @@ HRESULT MonikerMarshal_Create(IMoniker *inner, IUnknown **outer)
     return S_OK;
 }
 
-void * __RPC_USER MIDL_user_allocate(size_t size)
+void * __RPC_USER MIDL_user_allocate(SIZE_T size)
 {
     return HeapAlloc(GetProcessHeap(), 0, size);
 }
diff --git a/dlls/rpcrt4/ndr_ole.c b/dlls/rpcrt4/ndr_ole.c
index 729ab0b..a3264e7 100644
--- a/dlls/rpcrt4/ndr_ole.c
+++ b/dlls/rpcrt4/ndr_ole.c
@@ -354,7 +354,7 @@ void WINAPI NdrInterfacePointerFree(PMIDL_STUB_MESSAGE pStubMsg,
 /***********************************************************************
  *           NdrOleAllocate [RPCRT4.@]
  */
-void * WINAPI NdrOleAllocate(size_t Size)
+void * WINAPI NdrOleAllocate(SIZE_T Size)
 {
   if (!LoadCOM()) return NULL;
   return COM_MemAlloc(Size);
diff --git a/dlls/rpcrt4/rpc_epmap.c b/dlls/rpcrt4/rpc_epmap.c
index 36170dc..8547eaa 100644
--- a/dlls/rpcrt4/rpc_epmap.c
+++ b/dlls/rpcrt4/rpc_epmap.c
@@ -596,7 +596,7 @@ RPC_STATUS WINAPI TowerConstruct(
     return RPC_S_OK;
 }
 
-void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t len)
+void __RPC_FAR * __RPC_USER MIDL_user_allocate(SIZE_T len)
 {
     return HeapAlloc(GetProcessHeap(), 0, len);
 }
diff --git a/dlls/rpcrt4/tests/cstub.c b/dlls/rpcrt4/tests/cstub.c
index c2531ee..88bf0e5 100644
--- a/dlls/rpcrt4/tests/cstub.c
+++ b/dlls/rpcrt4/tests/cstub.c
@@ -48,7 +48,7 @@ static GUID IID_if4 = {0x1234567b, 1234, 5678, {12,34,56,78,90,0xab,0xcd,0xef}};
 static int my_alloc_called;
 static int my_free_called;
 
-static void * CALLBACK my_alloc(size_t size)
+static void * CALLBACK my_alloc(SIZE_T size)
 {
     my_alloc_called++;
     return NdrOleAllocate(size);
diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c
index cba135a..0139e5d 100644
--- a/dlls/rpcrt4/tests/ndr_marshall.c
+++ b/dlls/rpcrt4/tests/ndr_marshall.c
@@ -36,7 +36,7 @@
 
 static int my_alloc_called;
 static int my_free_called;
-static void * CALLBACK my_alloc(size_t size)
+static void * CALLBACK my_alloc(SIZE_T size)
 {
     my_alloc_called++;
     return NdrOleAllocate(size);
diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c
index 9f39f01..b48eda2 100644
--- a/dlls/rpcrt4/tests/server.c
+++ b/dlls/rpcrt4/tests/server.c
@@ -51,7 +51,7 @@ static void InitFunctionPointers(void)
 }
 
 void __RPC_FAR *__RPC_USER
-midl_user_allocate(size_t n)
+midl_user_allocate(SIZE_T n)
 {
   return malloc(n);
 }
diff --git a/include/rpcndr.h b/include/rpcndr.h
index 3383c8c..10aac4c 100644
--- a/include/rpcndr.h
+++ b/include/rpcndr.h
@@ -195,7 +195,7 @@ typedef struct _MIDL_STUB_MESSAGE
   ULONG_PTR MaxCount;
   ULONG Offset;
   ULONG ActualCount;
-  void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(size_t);
+  void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(SIZE_T);
   void (__RPC_API *pfnFree)(void *);
   unsigned char *StackTop;
   unsigned char *pPresentedType;
@@ -322,7 +322,7 @@ typedef struct _USER_MARSHAL_CB
 
 typedef struct _MALLOC_FREE_STRUCT
 {
-  void * (__WINE_ALLOC_SIZE(1) __RPC_USER *pfnAllocate)(size_t);
+  void * (__WINE_ALLOC_SIZE(1) __RPC_USER *pfnAllocate)(SIZE_T);
   void   (__RPC_USER *pfnFree)(void *);
 } MALLOC_FREE_STRUCT;
 
@@ -335,7 +335,7 @@ typedef struct _COMM_FAULT_OFFSETS
 typedef struct _MIDL_STUB_DESC
 {
   void *RpcInterfaceInformation;
-  void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(size_t);
+  void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(SIZE_T);
   void (__RPC_API *pfnFree)(void *);
   union {
     handle_t *pAutoHandle;
@@ -474,7 +474,7 @@ typedef struct _NDR_USER_MARSHAL_INFO_LEVEL1
 {
     void *Buffer;
     ULONG BufferSize;
-    void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(size_t);
+    void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(SIZE_T);
     void (__RPC_API *pfnFree)(void *);
     struct IRpcChannelBuffer *pRpcChannelBuffer;
     ULONG_PTR Reserved[5];
@@ -678,7 +678,7 @@ RPCRTAPI RPC_STATUS RPC_ENTRY
                             ULONG *pFaultStatus, RPC_STATUS Status_ );
 
 RPCRTAPI void* RPC_ENTRY
-  NdrOleAllocate( size_t Size ) __WINE_ALLOC_SIZE(1);
+  NdrOleAllocate( SIZE_T Size ) __WINE_ALLOC_SIZE(1);
 RPCRTAPI void RPC_ENTRY
   NdrOleFree( void* NodeToFree );
 
@@ -739,11 +739,11 @@ RPCRTAPI void RPC_ENTRY
 RPCRTAPI void RPC_ENTRY
   NdrRpcSmSetClientToOsf( PMIDL_STUB_MESSAGE pMessage );
 RPCRTAPI void * RPC_ENTRY
-  NdrRpcSmClientAllocate( size_t Size ) __WINE_ALLOC_SIZE(1);
+  NdrRpcSmClientAllocate( SIZE_T Size ) __WINE_ALLOC_SIZE(1);
 RPCRTAPI void RPC_ENTRY
   NdrRpcSmClientFree( void *NodeToFree );
 RPCRTAPI void * RPC_ENTRY
-  NdrRpcSsDefaultAllocate( size_t Size ) __WINE_ALLOC_SIZE(1);
+  NdrRpcSsDefaultAllocate( SIZE_T Size ) __WINE_ALLOC_SIZE(1);
 RPCRTAPI void RPC_ENTRY
   NdrRpcSsDefaultFree( void *NodeToFree );
 
diff --git a/programs/rpcss/irotp.c b/programs/rpcss/irotp.c
index 6f32205..97a4a0e 100644
--- a/programs/rpcss/irotp.c
+++ b/programs/rpcss/irotp.c
@@ -368,7 +368,7 @@ void __RPC_USER IrotContextHandle_rundown(IrotContextHandle ctxt_handle)
     rot_entry_release(rot_entry);
 }
 
-void * __RPC_USER MIDL_user_allocate(size_t size)
+void * __RPC_USER MIDL_user_allocate(SIZE_T size)
 {
     return HeapAlloc(GetProcessHeap(), 0, size);
 }
diff --git a/programs/services/rpc.c b/programs/services/rpc.c
index 99180bb..7c09f55 100644
--- a/programs/services/rpc.c
+++ b/programs/services/rpc.c
@@ -1234,7 +1234,7 @@ void __RPC_USER SC_RPC_HANDLE_rundown(SC_RPC_HANDLE handle)
     SC_RPC_HANDLE_destroy(handle);
 }
 
-void  __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t len)
+void  __RPC_FAR * __RPC_USER MIDL_user_allocate(SIZE_T len)
 {
     return HeapAlloc(GetProcessHeap(), 0, len);
 }
diff --git a/tools/widl/header.c b/tools/widl/header.c
index 4403ebc..b669ae2 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -990,7 +990,7 @@ static void write_rpc_interface_start(FILE *header, const type_t *iface)
   if (!allocate_written)
   {
     allocate_written = 1;
-    fprintf(header, "void * __RPC_USER MIDL_user_allocate(size_t);\n");
+    fprintf(header, "void * __RPC_USER MIDL_user_allocate(SIZE_T);\n");
     fprintf(header, "void __RPC_USER MIDL_user_free(void *);\n\n");
   }
 




More information about the wine-cvs mailing list