Module: wine Branch: master Commit: 7b2bb14be2e1a2b5ed19c289446c9e452b3690c4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7b2bb14be2e1a2b5ed19c28944...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Oct 21 15:12:21 2011 +0200
hlink: Moved HLinkBrowseContext_Constructor to avoid vtbl forward declaration.
---
dlls/hlink/browse_ctx.c | 46 +++++++++++++++++++++------------------------- 1 files changed, 21 insertions(+), 25 deletions(-)
diff --git a/dlls/hlink/browse_ctx.c b/dlls/hlink/browse_ctx.c index 76a51c0..4e91398 100644 --- a/dlls/hlink/browse_ctx.c +++ b/dlls/hlink/browse_ctx.c @@ -24,8 +24,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(hlink);
-static const IHlinkBrowseContextVtbl hlvt; - typedef struct { IHlinkBrowseContext IHlinkBrowseContext_iface; @@ -39,29 +37,6 @@ static inline HlinkBCImpl *impl_from_IHlinkBrowseContext(IHlinkBrowseContext *if return CONTAINING_RECORD(iface, HlinkBCImpl, IHlinkBrowseContext_iface); }
- -HRESULT HLinkBrowseContext_Constructor(IUnknown *pUnkOuter, REFIID riid, - LPVOID *ppv) -{ - HlinkBCImpl * hl; - - TRACE("unkOut=%p riid=%s\n", pUnkOuter, debugstr_guid(riid)); - *ppv = NULL; - - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - hl = heap_alloc_zero(sizeof(HlinkBCImpl)); - if (!hl) - return E_OUTOFMEMORY; - - hl->ref = 1; - hl->IHlinkBrowseContext_iface.lpVtbl = &hlvt; - - *ppv = hl; - return S_OK; -} - static HRESULT WINAPI IHlinkBC_fnQueryInterface( IHlinkBrowseContext *iface, REFIID riid, LPVOID* ppvObj) { @@ -297,3 +272,24 @@ static const IHlinkBrowseContextVtbl hlvt = IHlinkBC_Clone, IHlinkBC_Close }; + +HRESULT HLinkBrowseContext_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv) +{ + HlinkBCImpl * hl; + + TRACE("unkOut=%p riid=%s\n", pUnkOuter, debugstr_guid(riid)); + *ppv = NULL; + + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + hl = heap_alloc_zero(sizeof(HlinkBCImpl)); + if (!hl) + return E_OUTOFMEMORY; + + hl->ref = 1; + hl->IHlinkBrowseContext_iface.lpVtbl = &hlvt; + + *ppv = hl; + return S_OK; +}