Module: wine Branch: master Commit: 79d03435ad11583e8a39cc06e877c77da813d142 URL: http://source.winehq.org/git/wine.git/?a=commit;h=79d03435ad11583e8a39cc06e8...
Author: Michael Stefaniuc mstefani@redhat.de Date: Fri Dec 10 09:32:41 2010 +0100
wuapi: Use an iface instead of a vtbl pointer in automatic_updates.
---
dlls/wuapi/updates.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/wuapi/updates.c b/dlls/wuapi/updates.c index 663ff39..d099fb4 100644 --- a/dlls/wuapi/updates.c +++ b/dlls/wuapi/updates.c @@ -35,13 +35,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(wuapi);
typedef struct _automatic_updates { - const struct IAutomaticUpdatesVtbl *vtbl; + IAutomaticUpdates IAutomaticUpdates_iface; LONG refs; } automatic_updates;
static inline automatic_updates *impl_from_IAutomaticUpdates( IAutomaticUpdates *iface ) { - return (automatic_updates *)((char*)iface - FIELD_OFFSET( automatic_updates, vtbl )); + return CONTAINING_RECORD(iface, automatic_updates, IAutomaticUpdates_iface); }
static ULONG WINAPI automatic_updates_AddRef( @@ -211,10 +211,10 @@ HRESULT AutomaticUpdates_create( IUnknown *pUnkOuter, LPVOID *ppObj ) updates = HeapAlloc( GetProcessHeap(), 0, sizeof(*updates) ); if (!updates) return E_OUTOFMEMORY;
- updates->vtbl = &automatic_updates_vtbl; + updates->IAutomaticUpdates_iface.lpVtbl = &automatic_updates_vtbl; updates->refs = 1;
- *ppObj = &updates->vtbl; + *ppObj = &updates->IAutomaticUpdates_iface;
TRACE("returning iface %p\n", *ppObj); return S_OK;