[PATCH 3/4] rpcrt4: More "unsigned long" to "ULONG" changes in preparation of the removal of WINE_NO_LONG_AS_INT.

Michael Stefaniuc mstefani at redhat.de
Thu Nov 9 16:02:49 CST 2006


---
 dlls/rpcrt4/ndr_fullpointer.c |    6 +++---
 dlls/rpcrt4/ndr_marshall.c    |   22 +++++++++++-----------
 dlls/rpcrt4/ndr_misc.h        |    4 ++--
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/dlls/rpcrt4/ndr_fullpointer.c b/dlls/rpcrt4/ndr_fullpointer.c
index 1cfd047..1d28023 100644
--- a/dlls/rpcrt4/ndr_fullpointer.c
+++ b/dlls/rpcrt4/ndr_fullpointer.c
@@ -72,7 +72,7 @@ void WINAPI NdrFullPointerXlatFree(PFULL
     HeapFree(GetProcessHeap(), 0, pXlatTables);
 }
 
-static void expand_pointer_table_if_necessary(PFULL_PTR_XLAT_TABLES pXlatTables, unsigned long RefId)
+static void expand_pointer_table_if_necessary(PFULL_PTR_XLAT_TABLES pXlatTables, ULONG RefId)
 {
     if (RefId >= pXlatTables->RefIdToPointer.NumberOfEntries)
     {
@@ -195,10 +195,10 @@ void WINAPI NdrFullPointerInsertRefId(PF
 
 int WINAPI NdrFullPointerFree(PFULL_PTR_XLAT_TABLES pXlatTables, void *Pointer)
 {
-    unsigned long Hash = 0;
+    ULONG Hash = 0;
     int i;
     PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry;
-    unsigned long RefId = 0;
+    ULONG RefId = 0;
 
     TRACE("(%p, %p)\n", pXlatTables, Pointer);
 
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index 3869c6e..c240e92 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -117,7 +117,7 @@ static unsigned char *WINAPI NdrBaseType
 static unsigned char *WINAPI NdrBaseTypeUnmarshall(PMIDL_STUB_MESSAGE, unsigned char **, PFORMAT_STRING, unsigned char);
 static void WINAPI NdrBaseTypeBufferSize(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING);
 static void WINAPI NdrBaseTypeFree(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING);
-static unsigned long WINAPI NdrBaseTypeMemorySize(PMIDL_STUB_MESSAGE, PFORMAT_STRING);
+static ULONG WINAPI NdrBaseTypeMemorySize(PMIDL_STUB_MESSAGE, PFORMAT_STRING);
 
 const NDR_MARSHALL NdrMarshaller[NDR_TABLE_SIZE] = {
   0,
@@ -399,7 +399,7 @@ static inline void SizeVariance(MIDL_STU
 
 PFORMAT_STRING ComputeConformanceOrVariance(
     MIDL_STUB_MESSAGE *pStubMsg, unsigned char *pMemory,
-    PFORMAT_STRING pFormat, ULONG_PTR def, ULONG *pCount)
+    PFORMAT_STRING pFormat, ULONG_PTR def, ULONG_PTR *pCount)
 {
   BYTE dtype = pFormat[0] & 0xf;
   short ofs = *(const short *)&pFormat[2];
@@ -802,7 +802,7 @@ static void PointerMarshall(PMIDL_STUB_M
   unsigned type = pFormat[0], attr = pFormat[1];
   PFORMAT_STRING desc;
   NDR_MARSHALL m;
-  unsigned long pointer_id;
+  ULONG pointer_id;
   int pointer_needs_marshaling;
 
   TRACE("(%p,%p,%p,%p)\n", pStubMsg, Buffer, Pointer, pFormat);
@@ -825,7 +825,7 @@ #endif
       pointer_needs_marshaling = 1;
     else
       pointer_needs_marshaling = 0;
-    pointer_id = (unsigned long)Pointer;
+    pointer_id = (ULONG)Pointer;
     TRACE("writing 0x%08lx to buffer\n", pointer_id);
     NDR_LOCAL_UINT32_WRITE(Buffer, pointer_id);
     break;
@@ -946,7 +946,7 @@ static void PointerBufferSize(PMIDL_STUB
   PFORMAT_STRING desc;
   NDR_BUFFERSIZE m;
   int pointer_needs_sizing;
-  unsigned long pointer_id;
+  ULONG pointer_id;
 
   TRACE("(%p,%p,%p)\n", pStubMsg, Pointer, pFormat);
   TRACE("type=0x%x, attr=", type); dump_pointer_attr(attr);
@@ -2742,7 +2742,7 @@ void WINAPI NdrComplexArrayFree(PMIDL_ST
     pMemory = ComplexFree(pStubMsg, pMemory, pFormat, NULL);
 }
 
-static unsigned long UserMarshalFlags(PMIDL_STUB_MESSAGE pStubMsg)
+static ULONG UserMarshalFlags(PMIDL_STUB_MESSAGE pStubMsg)
 {
   return MAKELONG(pStubMsg->dwDestContext,
                   pStubMsg->RpcMsg->DataRepresentation);
@@ -2761,7 +2761,7 @@ unsigned char * WINAPI NdrUserMarshalMar
 {
   unsigned flags = pFormat[1];
   unsigned index = *(const WORD*)&pFormat[2];
-  unsigned long uflag = UserMarshalFlags(pStubMsg);
+  ULONG uflag = UserMarshalFlags(pStubMsg);
   TRACE("(%p,%p,%p)\n", pStubMsg, pMemory, pFormat);
   TRACE("index=%d\n", index);
 
@@ -2795,7 +2795,7 @@ unsigned char * WINAPI NdrUserMarshalUnm
   unsigned flags = pFormat[1];
   unsigned index = *(const WORD*)&pFormat[2];
   DWORD memsize = *(const WORD*)&pFormat[4];
-  unsigned long uflag = UserMarshalFlags(pStubMsg);
+  ULONG uflag = UserMarshalFlags(pStubMsg);
   TRACE("(%p,%p,%p,%d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc);
   TRACE("index=%d\n", index);
 
@@ -2829,7 +2829,7 @@ void WINAPI NdrUserMarshalBufferSize(PMI
   unsigned flags = pFormat[1];
   unsigned index = *(const WORD*)&pFormat[2];
   DWORD bufsize = *(const WORD*)&pFormat[6];
-  unsigned long uflag = UserMarshalFlags(pStubMsg);
+  ULONG uflag = UserMarshalFlags(pStubMsg);
   TRACE("(%p,%p,%p)\n", pStubMsg, pMemory, pFormat);
   TRACE("index=%d\n", index);
 
@@ -2894,7 +2894,7 @@ void WINAPI NdrUserMarshalFree(PMIDL_STU
 {
 /*  unsigned flags = pFormat[1]; */
   unsigned index = *(const WORD*)&pFormat[2];
-  unsigned long uflag = UserMarshalFlags(pStubMsg);
+  ULONG uflag = UserMarshalFlags(pStubMsg);
   TRACE("(%p,%p,%p)\n", pStubMsg, pMemory, pFormat);
   TRACE("index=%d\n", index);
 
@@ -4698,7 +4698,7 @@ static void WINAPI NdrBaseTypeBufferSize
 /***********************************************************************
  *           NdrBaseTypeMemorySize [internal]
  */
-static unsigned long WINAPI NdrBaseTypeMemorySize(
+static ULONG WINAPI NdrBaseTypeMemorySize(
     PMIDL_STUB_MESSAGE pStubMsg,
     PFORMAT_STRING pFormat)
 {
diff --git a/dlls/rpcrt4/ndr_misc.h b/dlls/rpcrt4/ndr_misc.h
index b5c3d88..ebd70b8 100644
--- a/dlls/rpcrt4/ndr_misc.h
+++ b/dlls/rpcrt4/ndr_misc.h
@@ -32,7 +32,7 @@ struct IPSFactoryBuffer;
 
 PFORMAT_STRING ComputeConformanceOrVariance(
     MIDL_STUB_MESSAGE *pStubMsg, unsigned char *pMemory,
-    PFORMAT_STRING pFormat, ULONG_PTR def, ULONG *pCount);
+    PFORMAT_STRING pFormat, ULONG_PTR def, ULONG_PTR *pCount);
 
 static inline PFORMAT_STRING ComputeConformance(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat, ULONG def)
 {
@@ -53,7 +53,7 @@ static inline PFORMAT_STRING ComputeVari
 typedef unsigned char* (WINAPI *NDR_MARSHALL)  (PMIDL_STUB_MESSAGE, unsigned char*, PFORMAT_STRING);
 typedef unsigned char* (WINAPI *NDR_UNMARSHALL)(PMIDL_STUB_MESSAGE, unsigned char**,PFORMAT_STRING, unsigned char);
 typedef void           (WINAPI *NDR_BUFFERSIZE)(PMIDL_STUB_MESSAGE, unsigned char*, PFORMAT_STRING);
-typedef unsigned long  (WINAPI *NDR_MEMORYSIZE)(PMIDL_STUB_MESSAGE,                 PFORMAT_STRING);
+typedef ULONG          (WINAPI *NDR_MEMORYSIZE)(PMIDL_STUB_MESSAGE,                 PFORMAT_STRING);
 typedef void           (WINAPI *NDR_FREE)      (PMIDL_STUB_MESSAGE, unsigned char*, PFORMAT_STRING);
 
 extern const NDR_MARSHALL   NdrMarshaller[];
-- 
1.4.2.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20061109/64683fa3/attachment-0001.pgp


More information about the wine-patches mailing list