Commit 41ac7a3b authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

msxml3: Use an iface instead of a vtbl pointer in domattr.

parent 45b65d0f
...@@ -40,13 +40,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml); ...@@ -40,13 +40,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml);
typedef struct _domattr typedef struct _domattr
{ {
xmlnode node; xmlnode node;
const struct IXMLDOMAttributeVtbl *lpVtbl; IXMLDOMAttribute IXMLDOMAttribute_iface;
LONG ref; LONG ref;
} domattr; } domattr;
static inline domattr *impl_from_IXMLDOMAttribute( IXMLDOMAttribute *iface ) static inline domattr *impl_from_IXMLDOMAttribute( IXMLDOMAttribute *iface )
{ {
return (domattr *)((char*)iface - FIELD_OFFSET(domattr, lpVtbl)); return CONTAINING_RECORD(iface, domattr, IXMLDOMAttribute_iface);
} }
static HRESULT WINAPI domattr_QueryInterface( static HRESULT WINAPI domattr_QueryInterface(
...@@ -170,8 +170,8 @@ static HRESULT WINAPI domattr_Invoke( ...@@ -170,8 +170,8 @@ static HRESULT WINAPI domattr_Invoke(
hr = get_typeinfo(IXMLDOMAttribute_tid, &typeinfo); hr = get_typeinfo(IXMLDOMAttribute_tid, &typeinfo);
if(SUCCEEDED(hr)) if(SUCCEEDED(hr))
{ {
hr = ITypeInfo_Invoke(typeinfo, &(This->lpVtbl), dispIdMember, wFlags, pDispParams, hr = ITypeInfo_Invoke(typeinfo, &This->IXMLDOMAttribute_iface, dispIdMember, wFlags,
pVarResult, pExcepInfo, puArgErr); pDispParams, pVarResult, pExcepInfo, puArgErr);
ITypeInfo_Release(typeinfo); ITypeInfo_Release(typeinfo);
} }
return hr; return hr;
...@@ -616,12 +616,12 @@ IUnknown* create_attribute( xmlNodePtr attribute ) ...@@ -616,12 +616,12 @@ IUnknown* create_attribute( xmlNodePtr attribute )
if ( !This ) if ( !This )
return NULL; return NULL;
This->lpVtbl = &domattr_vtbl; This->IXMLDOMAttribute_iface.lpVtbl = &domattr_vtbl;
This->ref = 1; This->ref = 1;
init_xmlnode(&This->node, attribute, (IXMLDOMNode*)&This->lpVtbl, NULL); init_xmlnode(&This->node, attribute, (IXMLDOMNode*)&This->IXMLDOMAttribute_iface, NULL);
return (IUnknown*) &This->lpVtbl; return (IUnknown*)&This->IXMLDOMAttribute_iface;
} }
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment