From 4358b4d8e14a193c356086c1939d3e1809dfb957 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sat, 10 Jun 2006 11:55:30 +0200 Subject: [PATCH] dmcompos: Make the virtual table functions static where possible. --- dlls/dmcompos/chordmap.c | 13 +++++++++---- dlls/dmcompos/chordmaptrack.c | 10 +++++++--- dlls/dmcompos/composer.c | 4 ++-- dlls/dmcompos/dmcompos_private.h | 27 --------------------------- dlls/dmcompos/signposttrack.c | 10 +++++++--- 5 files changed, 25 insertions(+), 39 deletions(-) diff --git a/dlls/dmcompos/chordmap.c b/dlls/dmcompos/chordmap.c index 7691b423243..def045cb499 100644 --- a/dlls/dmcompos/chordmap.c +++ b/dlls/dmcompos/chordmap.c @@ -22,6 +22,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmcompos); WINE_DECLARE_DEBUG_CHANNEL(dmfile); +static ULONG WINAPI IDirectMusicChordMapImpl_IUnknown_AddRef (LPUNKNOWN iface); +static ULONG WINAPI IDirectMusicChordMapImpl_IDirectMusicChordMap_AddRef (LPDIRECTMUSICCHORDMAP iface); +static ULONG WINAPI IDirectMusicChordMapImpl_IDirectMusicObject_AddRef (LPDIRECTMUSICOBJECT iface); +static ULONG WINAPI IDirectMusicChordMapImpl_IPersistStream_AddRef (LPPERSISTSTREAM iface); + /***************************************************************************** * IDirectMusicChordMapImpl implementation */ @@ -52,7 +57,7 @@ static HRESULT WINAPI IDirectMusicChordMapImpl_IUnknown_QueryInterface (LPUNKNOW return E_NOINTERFACE; } -ULONG WINAPI IDirectMusicChordMapImpl_IUnknown_AddRef (LPUNKNOWN iface) { +static ULONG WINAPI IDirectMusicChordMapImpl_IUnknown_AddRef (LPUNKNOWN iface) { ICOM_THIS_MULTI(IDirectMusicChordMapImpl, UnknownVtbl, iface); ULONG ref = InterlockedIncrement(&This->ref); @@ -90,7 +95,7 @@ static HRESULT WINAPI IDirectMusicChordMapImpl_IDirectMusicChordMap_QueryInterfa return IDirectMusicChordMapImpl_IUnknown_QueryInterface ((LPUNKNOWN)&This->UnknownVtbl, riid, ppobj); } -ULONG WINAPI IDirectMusicChordMapImpl_IDirectMusicChordMap_AddRef (LPDIRECTMUSICCHORDMAP iface) { +static ULONG WINAPI IDirectMusicChordMapImpl_IDirectMusicChordMap_AddRef (LPDIRECTMUSICCHORDMAP iface) { ICOM_THIS_MULTI(IDirectMusicChordMapImpl, ChordMapVtbl, iface); return IDirectMusicChordMapImpl_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl); } @@ -119,7 +124,7 @@ static HRESULT WINAPI IDirectMusicChordMapImpl_IDirectMusicObject_QueryInterface return IDirectMusicChordMapImpl_IUnknown_QueryInterface ((LPUNKNOWN)&This->UnknownVtbl, riid, ppobj); } -ULONG WINAPI IDirectMusicChordMapImpl_IDirectMusicObject_AddRef (LPDIRECTMUSICOBJECT iface) { +static ULONG WINAPI IDirectMusicChordMapImpl_IDirectMusicObject_AddRef (LPDIRECTMUSICOBJECT iface) { ICOM_THIS_MULTI(IDirectMusicChordMapImpl, ObjectVtbl, iface); return IDirectMusicChordMapImpl_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl); } @@ -334,7 +339,7 @@ static HRESULT WINAPI IDirectMusicChordMapImpl_IPersistStream_QueryInterface (LP return IDirectMusicChordMapImpl_IUnknown_QueryInterface ((LPUNKNOWN)&This->UnknownVtbl, riid, ppobj); } -ULONG WINAPI IDirectMusicChordMapImpl_IPersistStream_AddRef (LPPERSISTSTREAM iface) { +static ULONG WINAPI IDirectMusicChordMapImpl_IPersistStream_AddRef (LPPERSISTSTREAM iface) { ICOM_THIS_MULTI(IDirectMusicChordMapImpl, PersistStreamVtbl, iface); return IDirectMusicChordMapImpl_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl); } diff --git a/dlls/dmcompos/chordmaptrack.c b/dlls/dmcompos/chordmaptrack.c index f0e47f745c6..88b07241a53 100644 --- a/dlls/dmcompos/chordmaptrack.c +++ b/dlls/dmcompos/chordmaptrack.c @@ -21,6 +21,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmcompos); +static ULONG WINAPI IDirectMusicChordMapTrack_IUnknown_AddRef (LPUNKNOWN iface); +static ULONG WINAPI IDirectMusicChordMapTrack_IDirectMusicTrack_AddRef (LPDIRECTMUSICTRACK8 iface); +static ULONG WINAPI IDirectMusicChordMapTrack_IPersistStream_AddRef (LPPERSISTSTREAM iface); + /***************************************************************************** * IDirectMusicChordMapTrack implementation */ @@ -48,7 +52,7 @@ static HRESULT WINAPI IDirectMusicChordMapTrack_IUnknown_QueryInterface (LPUNKNO return E_NOINTERFACE; } -ULONG WINAPI IDirectMusicChordMapTrack_IUnknown_AddRef (LPUNKNOWN iface) { +static ULONG WINAPI IDirectMusicChordMapTrack_IUnknown_AddRef (LPUNKNOWN iface) { ICOM_THIS_MULTI(IDirectMusicChordMapTrack, UnknownVtbl, iface); ULONG ref = InterlockedIncrement(&This->ref); @@ -86,7 +90,7 @@ static HRESULT WINAPI IDirectMusicChordMapTrack_IDirectMusicTrack_QueryInterface return IDirectMusicChordMapTrack_IUnknown_QueryInterface ((LPUNKNOWN)&This->UnknownVtbl, riid, ppobj); } -ULONG WINAPI IDirectMusicChordMapTrack_IDirectMusicTrack_AddRef (LPDIRECTMUSICTRACK8 iface) { +static ULONG WINAPI IDirectMusicChordMapTrack_IDirectMusicTrack_AddRef (LPDIRECTMUSICTRACK8 iface) { ICOM_THIS_MULTI(IDirectMusicChordMapTrack, TrackVtbl, iface); return IDirectMusicChordMapTrack_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl); } @@ -218,7 +222,7 @@ static HRESULT WINAPI IDirectMusicChordMapTrack_IPersistStream_QueryInterface (L return IDirectMusicChordMapTrack_IUnknown_QueryInterface ((LPUNKNOWN)&This->UnknownVtbl, riid, ppobj); } -ULONG WINAPI IDirectMusicChordMapTrack_IPersistStream_AddRef (LPPERSISTSTREAM iface) { +static ULONG WINAPI IDirectMusicChordMapTrack_IPersistStream_AddRef (LPPERSISTSTREAM iface) { ICOM_THIS_MULTI(IDirectMusicChordMapTrack, PersistStreamVtbl, iface); return IDirectMusicChordMapTrack_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl); } diff --git a/dlls/dmcompos/composer.c b/dlls/dmcompos/composer.c index 291f93250bc..0767a02a820 100644 --- a/dlls/dmcompos/composer.c +++ b/dlls/dmcompos/composer.c @@ -28,7 +28,7 @@ static HRESULT WINAPI IDirectMusicComposerImpl_QueryInterface (LPDIRECTMUSICCOMP if (IsEqualIID (riid, &IID_IUnknown) || IsEqualIID (riid, &IID_IDirectMusicComposer)) { - IDirectMusicComposerImpl_AddRef(iface); + IUnknown_AddRef(iface); *ppobj = This; return S_OK; } @@ -36,7 +36,7 @@ static HRESULT WINAPI IDirectMusicComposerImpl_QueryInterface (LPDIRECTMUSICCOMP return E_NOINTERFACE; } -ULONG WINAPI IDirectMusicComposerImpl_AddRef (LPDIRECTMUSICCOMPOSER iface) { +static ULONG WINAPI IDirectMusicComposerImpl_AddRef (LPDIRECTMUSICCOMPOSER iface) { IDirectMusicComposerImpl *This = (IDirectMusicComposerImpl *)iface; ULONG ref = InterlockedIncrement(&This->ref); diff --git a/dlls/dmcompos/dmcompos_private.h b/dlls/dmcompos/dmcompos_private.h index 4382e5be683..d3053bd3aa4 100644 --- a/dlls/dmcompos/dmcompos_private.h +++ b/dlls/dmcompos/dmcompos_private.h @@ -74,15 +74,6 @@ struct IDirectMusicChordMapImpl { }; -/* IUnknown: */ -extern ULONG WINAPI IDirectMusicChordMapImpl_IUnknown_AddRef (LPUNKNOWN iface); -/* IDirectMusicChordMap: */ -extern ULONG WINAPI IDirectMusicChordMapImpl_IDirectMusicChordMap_AddRef (LPDIRECTMUSICCHORDMAP iface); -/* IDirectMusicObject: */ -extern ULONG WINAPI IDirectMusicChordMapImpl_IDirectMusicObject_AddRef (LPDIRECTMUSICOBJECT iface); -/* IPersistStream: */ -extern ULONG WINAPI IDirectMusicChordMapImpl_IPersistStream_AddRef (LPPERSISTSTREAM iface); - /***************************************************************************** * IDirectMusicComposerImpl implementation structure */ @@ -94,10 +85,6 @@ struct IDirectMusicComposerImpl { /* IDirectMusicComposerImpl fields */ }; -/* IUnknown: */ -extern ULONG WINAPI IDirectMusicComposerImpl_AddRef (LPDIRECTMUSICCOMPOSER iface); - - /***************************************************************************** * IDirectMusicChordMapTrack implementation structure */ @@ -112,13 +99,6 @@ struct IDirectMusicChordMapTrack { LPDMUS_OBJECTDESC pDesc; }; -/* IUnknown: */ -extern ULONG WINAPI IDirectMusicChordMapTrack_IUnknown_AddRef (LPUNKNOWN iface); -/* IDirectMusicTrack(8): */ -extern ULONG WINAPI IDirectMusicChordMapTrack_IDirectMusicTrack_AddRef (LPDIRECTMUSICTRACK8 iface); -/* IPersistStream: */ -extern ULONG WINAPI IDirectMusicChordMapTrack_IPersistStream_AddRef (LPPERSISTSTREAM iface); - /***************************************************************************** * IDirectMusicSignPostTrack implementation structure */ @@ -133,13 +113,6 @@ struct IDirectMusicSignPostTrack { LPDMUS_OBJECTDESC pDesc; }; -/* IUnknown: */ -extern ULONG WINAPI IDirectMusicSignPostTrack_IUnknown_AddRef (LPUNKNOWN iface); -/* IDirectMusicTrack(8): */ -extern ULONG WINAPI IDirectMusicSignPostTrack_IDirectMusicTrack_AddRef (LPDIRECTMUSICTRACK8 iface); -/* IPersistStream: */ -extern ULONG WINAPI IDirectMusicSignPostTrack_IPersistStream_AddRef (LPPERSISTSTREAM iface); - /********************************************************************** * Dll lifetime tracking declaration for dmcompos.dll */ diff --git a/dlls/dmcompos/signposttrack.c b/dlls/dmcompos/signposttrack.c index 98be540fbc6..0333a8ccf42 100644 --- a/dlls/dmcompos/signposttrack.c +++ b/dlls/dmcompos/signposttrack.c @@ -21,6 +21,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmcompos); +static ULONG WINAPI IDirectMusicSignPostTrack_IUnknown_AddRef (LPUNKNOWN iface); +static ULONG WINAPI IDirectMusicSignPostTrack_IDirectMusicTrack_AddRef (LPDIRECTMUSICTRACK8 iface); +static ULONG WINAPI IDirectMusicSignPostTrack_IPersistStream_AddRef (LPPERSISTSTREAM iface); + /***************************************************************************** * IDirectMusicSignPostTrack implementation */ @@ -48,7 +52,7 @@ static HRESULT WINAPI IDirectMusicSignPostTrack_IUnknown_QueryInterface (LPUNKNO return E_NOINTERFACE; } -ULONG WINAPI IDirectMusicSignPostTrack_IUnknown_AddRef (LPUNKNOWN iface) { +static ULONG WINAPI IDirectMusicSignPostTrack_IUnknown_AddRef (LPUNKNOWN iface) { ICOM_THIS_MULTI(IDirectMusicSignPostTrack, UnknownVtbl, iface); ULONG ref = InterlockedIncrement(&This->ref); @@ -86,7 +90,7 @@ static HRESULT WINAPI IDirectMusicSignPostTrack_IDirectMusicTrack_QueryInterface return IDirectMusicSignPostTrack_IUnknown_QueryInterface ((LPUNKNOWN)&This->UnknownVtbl, riid, ppobj); } -ULONG WINAPI IDirectMusicSignPostTrack_IDirectMusicTrack_AddRef (LPDIRECTMUSICTRACK8 iface) { +static ULONG WINAPI IDirectMusicSignPostTrack_IDirectMusicTrack_AddRef (LPDIRECTMUSICTRACK8 iface) { ICOM_THIS_MULTI(IDirectMusicSignPostTrack, TrackVtbl, iface); return IDirectMusicSignPostTrack_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl); } @@ -215,7 +219,7 @@ static HRESULT WINAPI IDirectMusicSignPostTrack_IPersistStream_QueryInterface (L return IDirectMusicSignPostTrack_IUnknown_QueryInterface ((LPUNKNOWN)&This->UnknownVtbl, riid, ppobj); } -ULONG WINAPI IDirectMusicSignPostTrack_IPersistStream_AddRef (LPPERSISTSTREAM iface) { +static ULONG WINAPI IDirectMusicSignPostTrack_IPersistStream_AddRef (LPPERSISTSTREAM iface) { ICOM_THIS_MULTI(IDirectMusicSignPostTrack, PersistStreamVtbl, iface); return IDirectMusicSignPostTrack_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl); }