crypt32: Get rid of PCONTEXT_PROPERTY_LIST typedef.

This commit is contained in:
Jacek Caban 2013-09-04 12:38:36 +02:00 committed by Alexandre Julliard
parent ebaf4dd5a4
commit d8c3ccee28
7 changed files with 35 additions and 38 deletions

View File

@ -211,7 +211,7 @@ BOOL WINAPI CertFreeCertificateContext(PCCERT_CONTEXT pCertContext)
DWORD WINAPI CertEnumCertificateContextProperties(PCCERT_CONTEXT pCertContext,
DWORD dwPropId)
{
PCONTEXT_PROPERTY_LIST properties = Context_GetProperties(
CONTEXT_PROPERTY_LIST *properties = Context_GetProperties(
pCertContext, sizeof(CERT_CONTEXT));
DWORD ret;
@ -264,7 +264,7 @@ static BOOL CertContext_GetProperty(void *context, DWORD dwPropId,
void *pvData, DWORD *pcbData)
{
PCCERT_CONTEXT pCertContext = context;
PCONTEXT_PROPERTY_LIST properties =
CONTEXT_PROPERTY_LIST *properties =
Context_GetProperties(context, sizeof(CERT_CONTEXT));
BOOL ret;
CRYPT_DATA_BLOB blob;
@ -481,7 +481,7 @@ static void CRYPT_CopyKeyProvInfo(PCRYPT_KEY_PROV_INFO to,
}
}
static BOOL CertContext_SetKeyProvInfoProperty(PCONTEXT_PROPERTY_LIST properties,
static BOOL CertContext_SetKeyProvInfoProperty(CONTEXT_PROPERTY_LIST *properties,
const CRYPT_KEY_PROV_INFO *info)
{
BOOL ret;
@ -515,7 +515,7 @@ static BOOL CertContext_SetKeyProvInfoProperty(PCONTEXT_PROPERTY_LIST properties
static BOOL CertContext_SetProperty(void *context, DWORD dwPropId,
DWORD dwFlags, const void *pvData)
{
PCONTEXT_PROPERTY_LIST properties =
CONTEXT_PROPERTY_LIST *properties =
Context_GetProperties(context, sizeof(CERT_CONTEXT));
BOOL ret;

View File

@ -41,7 +41,7 @@ typedef struct _DATA_CONTEXT
{
LONG ref;
ContextType type; /* always ContextTypeData */
PCONTEXT_PROPERTY_LIST properties;
CONTEXT_PROPERTY_LIST *properties;
} DATA_CONTEXT, *PDATA_CONTEXT;
typedef struct _LINK_CONTEXT
@ -156,7 +156,7 @@ void *Context_GetLinkedContext(void *context, size_t contextSize)
contextSize);
}
PCONTEXT_PROPERTY_LIST Context_GetProperties(const void *context, size_t contextSize)
CONTEXT_PROPERTY_LIST *Context_GetProperties(const void *context, size_t contextSize)
{
PBASE_CONTEXT ptr = BASE_CONTEXT_FROM_CONTEXT(context, contextSize);
@ -204,7 +204,7 @@ BOOL Context_Release(void *context, size_t contextSize,
void Context_CopyProperties(const void *to, const void *from,
size_t contextSize)
{
PCONTEXT_PROPERTY_LIST toProperties, fromProperties;
CONTEXT_PROPERTY_LIST *toProperties, *fromProperties;
toProperties = Context_GetProperties(to, contextSize);
fromProperties = Context_GetProperties(from, contextSize);

View File

@ -354,7 +354,7 @@ BOOL WINAPI CertFreeCRLContext( PCCRL_CONTEXT pCrlContext)
DWORD WINAPI CertEnumCRLContextProperties(PCCRL_CONTEXT pCRLContext,
DWORD dwPropId)
{
PCONTEXT_PROPERTY_LIST properties = Context_GetProperties(
CONTEXT_PROPERTY_LIST *properties = Context_GetProperties(
pCRLContext, sizeof(CRL_CONTEXT));
DWORD ret;
@ -388,7 +388,7 @@ static BOOL CRLContext_GetHashProp(PCCRL_CONTEXT context, DWORD dwPropId,
static BOOL CRLContext_GetProperty(PCCRL_CONTEXT context, DWORD dwPropId,
void *pvData, DWORD *pcbData)
{
PCONTEXT_PROPERTY_LIST properties =
CONTEXT_PROPERTY_LIST *properties =
Context_GetProperties(context, sizeof(CRL_CONTEXT));
BOOL ret;
CRYPT_DATA_BLOB blob;
@ -488,7 +488,7 @@ BOOL WINAPI CertGetCRLContextProperty(PCCRL_CONTEXT pCRLContext,
static BOOL CRLContext_SetProperty(PCCRL_CONTEXT context, DWORD dwPropId,
DWORD dwFlags, const void *pvData)
{
PCONTEXT_PROPERTY_LIST properties =
CONTEXT_PROPERTY_LIST *properties =
Context_GetProperties(context, sizeof(CRL_CONTEXT));
BOOL ret;

View File

@ -233,8 +233,7 @@ typedef enum _CertStoreType {
StoreTypeProvider,
} CertStoreType;
struct _CONTEXT_PROPERTY_LIST;
typedef struct _CONTEXT_PROPERTY_LIST *PCONTEXT_PROPERTY_LIST;
typedef struct _CONTEXT_PROPERTY_LIST CONTEXT_PROPERTY_LIST;
#define WINE_CRYPTCERTSTORE_MAGIC 0x74726563
@ -256,7 +255,7 @@ typedef struct WINE_CRYPTCERTSTORE
CONTEXT_FUNCS crls;
CONTEXT_FUNCS ctls;
PFN_CERT_STORE_PROV_CONTROL control; /* optional */
PCONTEXT_PROPERTY_LIST properties;
CONTEXT_PROPERTY_LIST *properties;
} WINECRYPT_CERTSTORE, *PWINECRYPT_CERTSTORE;
void CRYPT_InitStore(WINECRYPT_CERTSTORE *store, DWORD dwFlags,
@ -358,7 +357,7 @@ void Context_CopyProperties(const void *to, const void *from,
/* Returns context's properties, or the linked context's properties if context
* is a link context.
*/
PCONTEXT_PROPERTY_LIST Context_GetProperties(const void *context, size_t contextSize) DECLSPEC_HIDDEN;
CONTEXT_PROPERTY_LIST *Context_GetProperties(const void *context, size_t contextSize) DECLSPEC_HIDDEN;
void Context_AddRef(void *context, size_t contextSize) DECLSPEC_HIDDEN;
@ -376,26 +375,26 @@ BOOL Context_Release(void *context, size_t contextSize,
* Context property list functions
*/
PCONTEXT_PROPERTY_LIST ContextPropertyList_Create(void) DECLSPEC_HIDDEN;
CONTEXT_PROPERTY_LIST *ContextPropertyList_Create(void) DECLSPEC_HIDDEN;
/* Searches for the property with ID id in the context. Returns TRUE if found,
* and copies the property's length and a pointer to its data to blob.
* Otherwise returns FALSE.
*/
BOOL ContextPropertyList_FindProperty(PCONTEXT_PROPERTY_LIST list, DWORD id,
BOOL ContextPropertyList_FindProperty(CONTEXT_PROPERTY_LIST *list, DWORD id,
PCRYPT_DATA_BLOB blob) DECLSPEC_HIDDEN;
BOOL ContextPropertyList_SetProperty(PCONTEXT_PROPERTY_LIST list, DWORD id,
BOOL ContextPropertyList_SetProperty(CONTEXT_PROPERTY_LIST *list, DWORD id,
const BYTE *pbData, size_t cbData) DECLSPEC_HIDDEN;
void ContextPropertyList_RemoveProperty(PCONTEXT_PROPERTY_LIST list, DWORD id) DECLSPEC_HIDDEN;
void ContextPropertyList_RemoveProperty(CONTEXT_PROPERTY_LIST *list, DWORD id) DECLSPEC_HIDDEN;
DWORD ContextPropertyList_EnumPropIDs(PCONTEXT_PROPERTY_LIST list, DWORD id) DECLSPEC_HIDDEN;
DWORD ContextPropertyList_EnumPropIDs(CONTEXT_PROPERTY_LIST *list, DWORD id) DECLSPEC_HIDDEN;
void ContextPropertyList_Copy(PCONTEXT_PROPERTY_LIST to,
PCONTEXT_PROPERTY_LIST from) DECLSPEC_HIDDEN;
void ContextPropertyList_Copy(CONTEXT_PROPERTY_LIST *to,
CONTEXT_PROPERTY_LIST *from) DECLSPEC_HIDDEN;
void ContextPropertyList_Free(PCONTEXT_PROPERTY_LIST list) DECLSPEC_HIDDEN;
void ContextPropertyList_Free(CONTEXT_PROPERTY_LIST *list) DECLSPEC_HIDDEN;
/**
* Context list functions. A context list is a simple list of link contexts.

View File

@ -489,7 +489,7 @@ BOOL WINAPI CertFreeCTLContext(PCCTL_CONTEXT pCTLContext)
DWORD WINAPI CertEnumCTLContextProperties(PCCTL_CONTEXT pCTLContext,
DWORD dwPropId)
{
PCONTEXT_PROPERTY_LIST properties = Context_GetProperties(
CONTEXT_PROPERTY_LIST *properties = Context_GetProperties(
pCTLContext, sizeof(CTL_CONTEXT));
DWORD ret;
@ -523,7 +523,7 @@ static BOOL CTLContext_GetHashProp(PCCTL_CONTEXT context, DWORD dwPropId,
static BOOL CTLContext_GetProperty(PCCTL_CONTEXT context, DWORD dwPropId,
void *pvData, DWORD *pcbData)
{
PCONTEXT_PROPERTY_LIST properties =
CONTEXT_PROPERTY_LIST *properties =
Context_GetProperties(context, sizeof(CTL_CONTEXT));
BOOL ret;
CRYPT_DATA_BLOB blob;
@ -621,8 +621,7 @@ BOOL WINAPI CertGetCTLContextProperty(PCCTL_CONTEXT pCTLContext,
static BOOL CTLContext_SetProperty(PCCTL_CONTEXT context, DWORD dwPropId,
DWORD dwFlags, const void *pvData)
{
PCONTEXT_PROPERTY_LIST properties =
Context_GetProperties(context, sizeof(CTL_CONTEXT));
CONTEXT_PROPERTY_LIST *properties = Context_GetProperties(context, sizeof(CTL_CONTEXT));
BOOL ret;
TRACE("(%p, %d, %08x, %p)\n", context, dwPropId, dwFlags, pvData);

View File

@ -2071,7 +2071,7 @@ typedef struct _CDecodeMsg
} u;
CRYPT_DATA_BLOB msg_data;
CRYPT_DATA_BLOB detached_data;
PCONTEXT_PROPERTY_LIST properties;
CONTEXT_PROPERTY_LIST *properties;
} CDecodeMsg;
static void CDecodeMsg_Close(HCRYPTMSG hCryptMsg)

View File

@ -26,11 +26,11 @@
WINE_DEFAULT_DEBUG_CHANNEL(crypt);
typedef struct _CONTEXT_PROPERTY_LIST
struct _CONTEXT_PROPERTY_LIST
{
CRITICAL_SECTION cs;
struct list properties;
} CONTEXT_PROPERTY_LIST;
};
typedef struct _CONTEXT_PROPERTY
{
@ -40,9 +40,9 @@ typedef struct _CONTEXT_PROPERTY
struct list entry;
} CONTEXT_PROPERTY, *PCONTEXT_PROPERTY;
PCONTEXT_PROPERTY_LIST ContextPropertyList_Create(void)
CONTEXT_PROPERTY_LIST *ContextPropertyList_Create(void)
{
PCONTEXT_PROPERTY_LIST list = CryptMemAlloc(sizeof(CONTEXT_PROPERTY_LIST));
CONTEXT_PROPERTY_LIST *list = CryptMemAlloc(sizeof(CONTEXT_PROPERTY_LIST));
if (list)
{
@ -53,7 +53,7 @@ PCONTEXT_PROPERTY_LIST ContextPropertyList_Create(void)
return list;
}
void ContextPropertyList_Free(PCONTEXT_PROPERTY_LIST list)
void ContextPropertyList_Free(CONTEXT_PROPERTY_LIST *list)
{
PCONTEXT_PROPERTY prop, next;
@ -69,7 +69,7 @@ void ContextPropertyList_Free(PCONTEXT_PROPERTY_LIST list)
CryptMemFree(list);
}
BOOL ContextPropertyList_FindProperty(PCONTEXT_PROPERTY_LIST list, DWORD id,
BOOL ContextPropertyList_FindProperty(CONTEXT_PROPERTY_LIST *list, DWORD id,
PCRYPT_DATA_BLOB blob)
{
PCONTEXT_PROPERTY prop;
@ -92,7 +92,7 @@ BOOL ContextPropertyList_FindProperty(PCONTEXT_PROPERTY_LIST list, DWORD id,
return ret;
}
BOOL ContextPropertyList_SetProperty(PCONTEXT_PROPERTY_LIST list, DWORD id,
BOOL ContextPropertyList_SetProperty(CONTEXT_PROPERTY_LIST *list, DWORD id,
const BYTE *pbData, size_t cbData)
{
LPBYTE data;
@ -146,7 +146,7 @@ BOOL ContextPropertyList_SetProperty(PCONTEXT_PROPERTY_LIST list, DWORD id,
return ret;
}
void ContextPropertyList_RemoveProperty(PCONTEXT_PROPERTY_LIST list, DWORD id)
void ContextPropertyList_RemoveProperty(CONTEXT_PROPERTY_LIST *list, DWORD id)
{
PCONTEXT_PROPERTY prop, next;
@ -168,7 +168,7 @@ void ContextPropertyList_RemoveProperty(PCONTEXT_PROPERTY_LIST list, DWORD id)
/* Since the properties are stored in a list, this is a tad inefficient
* (O(n^2)) since I have to find the previous position every time.
*/
DWORD ContextPropertyList_EnumPropIDs(PCONTEXT_PROPERTY_LIST list, DWORD id)
DWORD ContextPropertyList_EnumPropIDs(CONTEXT_PROPERTY_LIST *list, DWORD id)
{
DWORD ret;
@ -202,8 +202,7 @@ DWORD ContextPropertyList_EnumPropIDs(PCONTEXT_PROPERTY_LIST list, DWORD id)
return ret;
}
void ContextPropertyList_Copy(PCONTEXT_PROPERTY_LIST to,
PCONTEXT_PROPERTY_LIST from)
void ContextPropertyList_Copy(CONTEXT_PROPERTY_LIST *to, CONTEXT_PROPERTY_LIST *from)
{
PCONTEXT_PROPERTY prop;