[PATCH 1/3] scrrun: Improved tracing of IDictionary methods
Nikolay Sivov
nsivov at codeweavers.com
Wed Dec 7 04:33:57 CST 2016
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/scrrun/dictionary.c | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/dlls/scrrun/dictionary.c b/dlls/scrrun/dictionary.c
index 844b4d1..3c8fc82 100644
--- a/dlls/scrrun/dictionary.c
+++ b/dlls/scrrun/dictionary.c
@@ -240,19 +240,19 @@ static HRESULT WINAPI dict_enum_QueryInterface(IEnumVARIANT *iface, REFIID riid,
static ULONG WINAPI dict_enum_AddRef(IEnumVARIANT *iface)
{
struct dictionary_enum *This = impl_from_IEnumVARIANT(iface);
- TRACE("(%p)\n", This);
- return InterlockedIncrement(&This->ref);
+ ULONG ref = InterlockedIncrement(&This->ref);
+ TRACE("(%p)->(%u)\n", This, ref);
+ return ref;
}
static ULONG WINAPI dict_enum_Release(IEnumVARIANT *iface)
{
struct dictionary_enum *This = impl_from_IEnumVARIANT(iface);
- LONG ref;
+ LONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)\n", This);
+ TRACE("(%p)->(%u)\n", This, ref);
- ref = InterlockedDecrement(&This->ref);
- if(ref == 0) {
+ if (!ref) {
list_remove(&This->notify);
IDictionary_Release(&This->dict->IDictionary_iface);
heap_free(This);
@@ -411,20 +411,21 @@ static HRESULT WINAPI dictionary_QueryInterface(IDictionary *iface, REFIID riid,
static ULONG WINAPI dictionary_AddRef(IDictionary *iface)
{
dictionary *This = impl_from_IDictionary(iface);
- TRACE("(%p)\n", This);
+ ULONG ref = InterlockedIncrement(&This->ref);
- return InterlockedIncrement(&This->ref);
+ TRACE("(%p)->(%u)\n", This, ref);
+
+ return ref;
}
static ULONG WINAPI dictionary_Release(IDictionary *iface)
{
dictionary *This = impl_from_IDictionary(iface);
- LONG ref;
+ ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)\n", This);
+ TRACE("(%p)->(%u)\n", This, ref);
- ref = InterlockedDecrement(&This->ref);
- if(ref == 0) {
+ if (!ref) {
IDictionary_RemoveAll(iface);
heap_free(This);
}
@@ -436,7 +437,7 @@ static HRESULT WINAPI dictionary_GetTypeInfoCount(IDictionary *iface, UINT *pcti
{
dictionary *This = impl_from_IDictionary(iface);
- TRACE("(%p)->()\n", This);
+ TRACE("(%p)->(%p)\n", This, pctinfo);
*pctinfo = 1;
return S_OK;
@@ -885,7 +886,7 @@ HRESULT WINAPI Dictionary_CreateInstance(IClassFactory *factory,IUnknown *outer,
{
dictionary *This;
- TRACE("(%p)\n", obj);
+ TRACE("(%p, %p, %s, %p)\n", factory, outer, debugstr_guid(riid), obj);
*obj = NULL;
--
2.10.2
More information about the wine-patches
mailing list