rpcrt4: Constify some variables
Andrew Talbot
andrew.talbot at talbotville.com
Fri Aug 17 16:10:58 CDT 2007
Changelog:
rpcrt4: Constify some variables.
diff -urN a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
--- a/dlls/rpcrt4/ndr_marshall.c 2007-07-19 17:59:58.000000000 +0100
+++ b/dlls/rpcrt4/ndr_marshall.c 2007-08-17 21:47:09.000000000 +0100
@@ -1748,7 +1748,7 @@
}
-static unsigned long EmbeddedComplexSize(PMIDL_STUB_MESSAGE pStubMsg,
+static unsigned long EmbeddedComplexSize(const MIDL_STUB_MESSAGE *pStubMsg,
PFORMAT_STRING pFormat)
{
switch (*pFormat) {
@@ -3109,7 +3109,7 @@
pMemory = ComplexFree(pStubMsg, pMemory, pFormat, NULL);
}
-static ULONG UserMarshalFlags(PMIDL_STUB_MESSAGE pStubMsg)
+static ULONG UserMarshalFlags(const MIDL_STUB_MESSAGE *pStubMsg)
{
return MAKELONG(pStubMsg->dwDestContext,
pStubMsg->RpcMsg->DataRepresentation);
@@ -4419,7 +4419,7 @@
EmbeddedPointerFree(pStubMsg, pMemory, pFormat);
}
-static ULONG get_discriminant(unsigned char fc, unsigned char *pMemory)
+static ULONG get_discriminant(unsigned char fc, const unsigned char *pMemory)
{
switch (fc)
{
@@ -4427,16 +4427,16 @@
case RPC_FC_CHAR:
case RPC_FC_SMALL:
case RPC_FC_USMALL:
- return *(UCHAR *)pMemory;
+ return *(const UCHAR *)pMemory;
case RPC_FC_WCHAR:
case RPC_FC_SHORT:
case RPC_FC_USHORT:
case RPC_FC_ENUM16:
- return *(USHORT *)pMemory;
+ return *(const USHORT *)pMemory;
case RPC_FC_LONG:
case RPC_FC_ULONG:
case RPC_FC_ENUM32:
- return *(ULONG *)pMemory;
+ return *(const ULONG *)pMemory;
default:
FIXME("Unhandled base type: 0x%02x\n", fc);
return 0;
@@ -5773,7 +5773,7 @@
return che;
}
-static struct context_handle_entry *context_entry_from_guid(LPGUID uuid)
+static struct context_handle_entry *context_entry_from_guid(LPCGUID uuid)
{
struct context_handle_entry *che;
LIST_FOR_EACH_ENTRY(che, &context_handle_list, struct context_handle_entry, entry)
@@ -5823,7 +5823,7 @@
static UINT ndr_update_context_handle(NDR_CCONTEXT *CContext,
RPC_BINDING_HANDLE hBinding,
- ndr_context_handle *chi)
+ const ndr_context_handle *chi)
{
struct context_handle_entry *che = NULL;
diff -urN a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c
--- a/dlls/rpcrt4/rpc_binding.c 2007-07-13 18:00:03.000000000 +0100
+++ b/dlls/rpcrt4/rpc_binding.c 2007-08-17 21:47:28.000000000 +0100
@@ -274,8 +274,8 @@
}
RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding, RpcConnection** Connection,
- PRPC_SYNTAX_IDENTIFIER TransferSyntax,
- PRPC_SYNTAX_IDENTIFIER InterfaceId)
+ const RPC_SYNTAX_IDENTIFIER *TransferSyntax,
+ const RPC_SYNTAX_IDENTIFIER *InterfaceId)
{
TRACE("(Binding == ^%p)\n", Binding);
diff -urN a/dlls/rpcrt4/rpc_binding.h b/dlls/rpcrt4/rpc_binding.h
--- a/dlls/rpcrt4/rpc_binding.h 2007-07-13 18:00:03.000000000 +0100
+++ b/dlls/rpcrt4/rpc_binding.h 2007-08-17 22:05:11.000000000 +0100
@@ -161,13 +161,14 @@
RPC_STATUS RPCRT4_MakeBinding(RpcBinding** Binding, RpcConnection* Connection);
RPC_STATUS RPCRT4_ExportBinding(RpcBinding** Binding, RpcBinding* OldBinding);
RPC_STATUS RPCRT4_DestroyBinding(RpcBinding* Binding);
-RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding, RpcConnection** Connection, PRPC_SYNTAX_IDENTIFIER TransferSyntax, PRPC_SYNTAX_IDENTIFIER InterfaceId);
+RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding, RpcConnection** Connection,
+ const RPC_SYNTAX_IDENTIFIER *TransferSyntax, const RPC_SYNTAX_IDENTIFIER *InterfaceId);
RPC_STATUS RPCRT4_CloseBinding(RpcBinding* Binding, RpcConnection* Connection);
BOOL RPCRT4_RPCSSOnDemandCall(PRPCSS_NP_MESSAGE msg, char *vardata_payload, PRPCSS_NP_REPLY reply);
HANDLE RPCRT4_GetMasterMutex(void);
HANDLE RPCRT4_RpcssNPConnect(void);
-static inline const char *rpcrt4_conn_get_name(RpcConnection *Connection)
+static inline const char *rpcrt4_conn_get_name(const RpcConnection *Connection)
{
return Connection->ops->name;
}
diff -urN a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c
--- a/dlls/rpcrt4/rpc_message.c 2007-07-23 17:45:24.000000000 +0100
+++ b/dlls/rpcrt4/rpc_message.c 2007-08-17 21:47:44.000000000 +0100
@@ -440,7 +440,7 @@
*/
static RPC_STATUS RPCRT4_SendAuth(RpcConnection *Connection, RpcPktHdr *Header,
void *Buffer, unsigned int BufferLength,
- void *Auth, unsigned int AuthLength)
+ const void *Auth, unsigned int AuthLength)
{
PUCHAR buffer_pos;
DWORD hdr_size;
More information about the wine-patches
mailing list