urlmon: Get rid of ICOM_THIS_MULTI macro.

This commit is contained in:
Jacek Caban 2009-03-29 21:31:27 +02:00 committed by Alexandre Julliard
parent 67d2fdc34a
commit 74e0072dfd
2 changed files with 10 additions and 9 deletions

View file

@ -35,11 +35,13 @@ typedef struct {
static IEnumFORMATETC *EnumFORMATETC_Create(UINT cfmtetc, const FORMATETC *rgfmtetc, UINT it);
#define ENUMF_THIS(iface) ICOM_THIS_MULTI(EnumFORMATETC, lpEnumFORMATETCVtbl, iface)
#define ENUMF_THIS(iface) DEFINE_THIS(EnumFORMATETC, EnumFORMATETC, iface)
static HRESULT WINAPI EnumFORMATETC_QueryInterface(IEnumFORMATETC *iface, REFIID riid, void **ppv)
{
TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
EnumFORMATETC *This = ENUMF_THIS(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
*ppv = NULL;
@ -55,7 +57,7 @@ static HRESULT WINAPI EnumFORMATETC_QueryInterface(IEnumFORMATETC *iface, REFIID
static ULONG WINAPI EnumFORMATETC_AddRef(IEnumFORMATETC *iface)
{
ENUMF_THIS(iface);
EnumFORMATETC *This = ENUMF_THIS(iface);
LONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref);
return ref;
@ -63,7 +65,7 @@ static ULONG WINAPI EnumFORMATETC_AddRef(IEnumFORMATETC *iface)
static ULONG WINAPI EnumFORMATETC_Release(IEnumFORMATETC *iface)
{
ENUMF_THIS(iface);
EnumFORMATETC *This = ENUMF_THIS(iface);
LONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref);
@ -81,7 +83,7 @@ static ULONG WINAPI EnumFORMATETC_Release(IEnumFORMATETC *iface)
static HRESULT WINAPI EnumFORMATETC_Next(IEnumFORMATETC *iface, ULONG celt,
FORMATETC *rgelt, ULONG *pceltFetched)
{
ENUMF_THIS(iface);
EnumFORMATETC *This = ENUMF_THIS(iface);
ULONG cnt;
TRACE("(%p)->(%d %p %p)\n", This, celt, rgelt, pceltFetched);
@ -108,7 +110,7 @@ static HRESULT WINAPI EnumFORMATETC_Next(IEnumFORMATETC *iface, ULONG celt,
static HRESULT WINAPI EnumFORMATETC_Skip(IEnumFORMATETC *iface, ULONG celt)
{
ENUMF_THIS(iface);
EnumFORMATETC *This = ENUMF_THIS(iface);
TRACE("(%p)->(%d)\n", This, celt);
@ -118,7 +120,7 @@ static HRESULT WINAPI EnumFORMATETC_Skip(IEnumFORMATETC *iface, ULONG celt)
static HRESULT WINAPI EnumFORMATETC_Reset(IEnumFORMATETC *iface)
{
ENUMF_THIS(iface);
EnumFORMATETC *This = ENUMF_THIS(iface);
TRACE("(%p)\n", This);
@ -128,7 +130,7 @@ static HRESULT WINAPI EnumFORMATETC_Reset(IEnumFORMATETC *iface)
static HRESULT WINAPI EnumFORMATETC_Clone(IEnumFORMATETC *iface, IEnumFORMATETC **ppenum)
{
ENUMF_THIS(iface);
EnumFORMATETC *This = ENUMF_THIS(iface);
TRACE("(%p)->(%p)\n", This, ppenum);

View file

@ -53,7 +53,6 @@ extern LONG URLMON_refCount;
static inline void URLMON_LockModule(void) { InterlockedIncrement( &URLMON_refCount ); }
static inline void URLMON_UnlockModule(void) { InterlockedDecrement( &URLMON_refCount ); }
#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
#define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc)))
#define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface)