Jacek Caban : crypt32: Use Context_AddRef instead of WINE_CONTEXT_INTERFACE .
Alexandre Julliard
julliard at winehq.org
Mon Oct 14 12:39:29 CDT 2013
Module: wine
Branch: master
Commit: 76066d1cfe28a9aa285705a91c8801a02efbd19c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=76066d1cfe28a9aa285705a91c8801a02efbd19c
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Oct 14 14:47:40 2013 +0200
crypt32: Use Context_AddRef instead of WINE_CONTEXT_INTERFACE.
---
dlls/crypt32/collectionstore.c | 2 +-
dlls/crypt32/context.c | 2 +-
dlls/crypt32/crypt32_private.h | 2 --
dlls/crypt32/object.c | 5 ++++-
dlls/crypt32/store.c | 3 ---
5 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/crypt32/collectionstore.c b/dlls/crypt32/collectionstore.c
index f8dbf6e..7f494c5 100644
--- a/dlls/crypt32/collectionstore.c
+++ b/dlls/crypt32/collectionstore.c
@@ -161,7 +161,7 @@ static void *CRYPT_CollectionAdvanceEnum(WINE_COLLECTIONSTORE *store,
* the free(pPrev) below can cause the ref count to become negative.
*/
child = Context_GetLinkedContext(pPrev);
- contextInterface->duplicate(child);
+ Context_AddRef(context_from_ptr(child));
child = contextFuncs->enumContext(storeEntry->store, child);
contextInterface->free(pPrev);
pPrev = NULL;
diff --git a/dlls/crypt32/context.c b/dlls/crypt32/context.c
index 2a44e9a..7f6f00d 100644
--- a/dlls/crypt32/context.c
+++ b/dlls/crypt32/context.c
@@ -235,7 +235,7 @@ void *ContextList_Enum(struct ContextList *list, void *pPrev)
if (listNext)
{
ret = ContextList_EntryToContext(list, listNext);
- list->contextInterface->duplicate(ret);
+ Context_AddRef(context_from_ptr(ret));
}
else
ret = NULL;
diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h
index 7b64dba..08f5563 100644
--- a/dlls/crypt32/crypt32_private.h
+++ b/dlls/crypt32/crypt32_private.h
@@ -217,7 +217,6 @@ typedef BOOL (WINAPI *AddContextToStoreFunc)(HCERTSTORE hCertStore,
typedef BOOL (WINAPI *AddEncodedContextToStoreFunc)(HCERTSTORE hCertStore,
DWORD dwCertEncodingType, const BYTE *pbEncoded, DWORD cbEncoded,
DWORD dwAddDisposition, const void **ppContext);
-typedef const void *(WINAPI *DuplicateContextFunc)(const void *context);
typedef const void *(WINAPI *EnumContextsInStoreFunc)(HCERTSTORE hCertStore,
const void *pPrevContext);
typedef DWORD (WINAPI *EnumPropertiesFunc)(const void *context, DWORD dwPropId);
@@ -236,7 +235,6 @@ typedef struct _WINE_CONTEXT_INTERFACE
CreateContextFunc create;
AddContextToStoreFunc addContextToStore;
AddEncodedContextToStoreFunc addEncodedToStore;
- DuplicateContextFunc duplicate;
EnumContextsInStoreFunc enumContextsInStore;
EnumPropertiesFunc enumProps;
GetContextPropertyFunc getProp;
diff --git a/dlls/crypt32/object.c b/dlls/crypt32/object.c
index 5f45d81..074bdd8 100644
--- a/dlls/crypt32/object.c
+++ b/dlls/crypt32/object.c
@@ -271,7 +271,10 @@ static BOOL CRYPT_QuerySerializedContextObject(DWORD dwObjectType,
*phCertStore = CertDuplicateStore(
*(HCERTSTORE *)((const BYTE *)context + certStoreOffset));
if (ppvContext)
- *ppvContext = contextInterface->duplicate(context);
+ {
+ *ppvContext = context;
+ Context_AddRef(context_from_ptr(context));
+ }
}
end:
diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c
index 506a33c..e3c6cfd 100644
--- a/dlls/crypt32/store.c
+++ b/dlls/crypt32/store.c
@@ -45,7 +45,6 @@ static const WINE_CONTEXT_INTERFACE gCertInterface = {
(CreateContextFunc)CertCreateCertificateContext,
(AddContextToStoreFunc)CertAddCertificateContextToStore,
(AddEncodedContextToStoreFunc)CertAddEncodedCertificateToStore,
- (DuplicateContextFunc)CertDuplicateCertificateContext,
(EnumContextsInStoreFunc)CertEnumCertificatesInStore,
(EnumPropertiesFunc)CertEnumCertificateContextProperties,
(GetContextPropertyFunc)CertGetCertificateContextProperty,
@@ -60,7 +59,6 @@ static const WINE_CONTEXT_INTERFACE gCRLInterface = {
(CreateContextFunc)CertCreateCRLContext,
(AddContextToStoreFunc)CertAddCRLContextToStore,
(AddEncodedContextToStoreFunc)CertAddEncodedCRLToStore,
- (DuplicateContextFunc)CertDuplicateCRLContext,
(EnumContextsInStoreFunc)CertEnumCRLsInStore,
(EnumPropertiesFunc)CertEnumCRLContextProperties,
(GetContextPropertyFunc)CertGetCRLContextProperty,
@@ -75,7 +73,6 @@ static const WINE_CONTEXT_INTERFACE gCTLInterface = {
(CreateContextFunc)CertCreateCTLContext,
(AddContextToStoreFunc)CertAddCTLContextToStore,
(AddEncodedContextToStoreFunc)CertAddEncodedCTLToStore,
- (DuplicateContextFunc)CertDuplicateCTLContext,
(EnumContextsInStoreFunc)CertEnumCTLsInStore,
(EnumPropertiesFunc)CertEnumCTLContextProperties,
(GetContextPropertyFunc)CertGetCTLContextProperty,
More information about the wine-cvs
mailing list