Christian Costa : dmusic: Display new ref in IDirectMusicBufferImpl_AddRef and IDirectMusicBufferImpl_Release .
Module: wine Branch: master Commit: 76a778be97ec894357c68a02ccc794e9ccc7cb01 URL: http://source.winehq.org/git/wine.git/?a=commit;h=76a778be97ec894357c68a02cc... Author: Christian Costa <titan.costa(a)gmail.com> Date: Tue Apr 24 22:32:52 2012 +0200 dmusic: Display new ref in IDirectMusicBufferImpl_AddRef and IDirectMusicBufferImpl_Release. --- dlls/dmusic/buffer.c | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dlls/dmusic/buffer.c b/dlls/dmusic/buffer.c index 63611a4..3c3395d 100644 --- a/dlls/dmusic/buffer.c +++ b/dlls/dmusic/buffer.c @@ -41,33 +41,33 @@ static HRESULT WINAPI IDirectMusicBufferImpl_QueryInterface(LPDIRECTMUSICBUFFER return E_NOINTERFACE; } -static ULONG WINAPI IDirectMusicBufferImpl_AddRef (LPDIRECTMUSICBUFFER iface) +static ULONG WINAPI IDirectMusicBufferImpl_AddRef(LPDIRECTMUSICBUFFER iface) { - IDirectMusicBufferImpl *This = impl_from_IDirectMusicBuffer(iface); - ULONG refCount = InterlockedIncrement(&This->ref); + IDirectMusicBufferImpl *This = impl_from_IDirectMusicBuffer(iface); + ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p)->(ref before=%u)\n", This, refCount - 1); + TRACE("(%p)->(): new ref = %u\n", iface, ref); - DMUSIC_LockModule(); + DMUSIC_LockModule(); - return refCount; + return ref; } static ULONG WINAPI IDirectMusicBufferImpl_Release(LPDIRECTMUSICBUFFER iface) { - IDirectMusicBufferImpl *This = impl_from_IDirectMusicBuffer(iface); - ULONG refCount = InterlockedDecrement(&This->ref); + IDirectMusicBufferImpl *This = impl_from_IDirectMusicBuffer(iface); + ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p)->(ref before=%u)\n", This, refCount + 1); + TRACE("(%p)->(): new ref = %u\n", iface, ref); - if (!refCount) { - HeapFree(GetProcessHeap(), 0, This->data); - HeapFree(GetProcessHeap(), 0, This); - } + if (!ref) { + HeapFree(GetProcessHeap(), 0, This->data); + HeapFree(GetProcessHeap(), 0, This); + } + + DMUSIC_UnlockModule(); - DMUSIC_UnlockModule(); - - return refCount; + return ref; } /* IDirectMusicBufferImpl IDirectMusicBuffer part: */
participants (1)
-
Alexandre Julliard