Module: wine Branch: master Commit: 90085afebf8966dbc2bb17fc645e8397d5cdb2cb URL: http://source.winehq.org/git/wine.git/?a=commit;h=90085afebf8966dbc2bb17fc64...
Author: Christian Costa titan.costa@gmail.com Date: Thu May 10 07:53:34 2012 +0200
dmsynth: Display new ref in trace for AddRef and Release.
---
dlls/dmsynth/synth.c | 32 ++++++++++++++++---------------- dlls/dmsynth/synthsink.c | 30 +++++++++++++++--------------- 2 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index 9c088af..657f3bd 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -59,32 +59,32 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_QueryInterface(LPDIRECTMUSICSYNTH8
static ULONG WINAPI IDirectMusicSynth8Impl_AddRef(LPDIRECTMUSICSYNTH8 iface) { - IDirectMusicSynth8Impl *This = impl_from_IDirectMusicSynth8(iface); - ULONG refCount = InterlockedIncrement(&This->ref); + IDirectMusicSynth8Impl *This = impl_from_IDirectMusicSynth8(iface); + ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(ref before=%u)\n", This, refCount - 1); + TRACE("(%p)->(): new ref = %u\n", This, ref);
- DMSYNTH_LockModule(); + DMSYNTH_LockModule();
- return refCount; + return ref; }
static ULONG WINAPI IDirectMusicSynth8Impl_Release(LPDIRECTMUSICSYNTH8 iface) { - IDirectMusicSynth8Impl *This = impl_from_IDirectMusicSynth8(iface); - ULONG refCount = InterlockedDecrement(&This->ref); + IDirectMusicSynth8Impl *This = impl_from_IDirectMusicSynth8(iface); + ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(ref before=%u)\n", This, refCount + 1); + TRACE("(%p)->(): new ref = %u\n", This, ref);
- if (!refCount) { - if (This->pLatencyClock) - IReferenceClock_Release(This->pLatencyClock); - HeapFree(GetProcessHeap(), 0, This); - } + if (!ref) { + if (This->pLatencyClock) + IReferenceClock_Release(This->pLatencyClock); + HeapFree(GetProcessHeap(), 0, This); + }
- DMSYNTH_UnlockModule(); - - return refCount; + DMSYNTH_UnlockModule(); + + return ref; }
/* IDirectMusicSynth8Impl IDirectMusicSynth part: */ diff --git a/dlls/dmsynth/synthsink.c b/dlls/dmsynth/synthsink.c index e5e164f..42c2d4c 100644 --- a/dlls/dmsynth/synthsink.c +++ b/dlls/dmsynth/synthsink.c @@ -53,32 +53,32 @@ static HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface(LPDIRECTMUSICSYNT
static ULONG WINAPI IDirectMusicSynthSinkImpl_AddRef(LPDIRECTMUSICSYNTHSINK iface) { - IDirectMusicSynthSinkImpl *This = impl_from_IDirectMusicSynthSink(iface); - ULONG refCount = InterlockedIncrement(&This->ref); + IDirectMusicSynthSinkImpl *This = impl_from_IDirectMusicSynthSink(iface); + ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(ref before=%u)\n", This, refCount - 1); + TRACE("(%p)->(): new ref = %u\n", This, ref);
- DMSYNTH_LockModule(); + DMSYNTH_LockModule();
- return refCount; + return ref; }
static ULONG WINAPI IDirectMusicSynthSinkImpl_Release(LPDIRECTMUSICSYNTHSINK iface) { - IDirectMusicSynthSinkImpl *This = impl_from_IDirectMusicSynthSink(iface); - ULONG refCount = InterlockedDecrement(&This->ref); + IDirectMusicSynthSinkImpl *This = impl_from_IDirectMusicSynthSink(iface); + ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(ref before=%u)\n", This, refCount + 1); + TRACE("(%p)->(): new ref = %u\n", This, ref);
- if (!refCount) { - if (This->latency_clock) - IReferenceClock_Release(This->latency_clock); - HeapFree(GetProcessHeap(), 0, This); - } + if (!ref) { + if (This->latency_clock) + IReferenceClock_Release(This->latency_clock); + HeapFree(GetProcessHeap(), 0, This); + }
- DMSYNTH_UnlockModule(); + DMSYNTH_UnlockModule();
- return refCount; + return ref; }
/* IDirectMusicSynthSinkImpl IDirectMusicSynthSink part: */