Commit e53582fd authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

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

parent 17b4de2b
...@@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml); ...@@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml);
typedef struct typedef struct
{ {
const struct IXMLDOMParseErrorVtbl *lpVtbl; IXMLDOMParseError IXMLDOMParseError_iface;
LONG ref; LONG ref;
LONG code, line, linepos, filepos; LONG code, line, linepos, filepos;
BSTR url, reason, srcText; BSTR url, reason, srcText;
...@@ -47,7 +47,7 @@ typedef struct ...@@ -47,7 +47,7 @@ typedef struct
static inline parse_error_t *impl_from_IXMLDOMParseError( IXMLDOMParseError *iface ) static inline parse_error_t *impl_from_IXMLDOMParseError( IXMLDOMParseError *iface )
{ {
return (parse_error_t *)((char*)iface - FIELD_OFFSET(parse_error_t, lpVtbl)); return CONTAINING_RECORD(iface, parse_error_t, IXMLDOMParseError_iface);
} }
static HRESULT WINAPI parseError_QueryInterface( static HRESULT WINAPI parseError_QueryInterface(
...@@ -180,8 +180,8 @@ static HRESULT WINAPI parseError_Invoke( ...@@ -180,8 +180,8 @@ static HRESULT WINAPI parseError_Invoke(
hr = get_typeinfo(IXMLDOMParseError_tid, &typeinfo); hr = get_typeinfo(IXMLDOMParseError_tid, &typeinfo);
if(SUCCEEDED(hr)) if(SUCCEEDED(hr))
{ {
hr = ITypeInfo_Invoke(typeinfo, &(This->lpVtbl), dispIdMember, wFlags, pDispParams, hr = ITypeInfo_Invoke(typeinfo, &This->IXMLDOMParseError_iface, dispIdMember, wFlags,
pVarResult, pExcepInfo, puArgErr); pDispParams, pVarResult, pExcepInfo, puArgErr);
ITypeInfo_Release(typeinfo); ITypeInfo_Release(typeinfo);
} }
...@@ -291,7 +291,7 @@ IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR src ...@@ -291,7 +291,7 @@ IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR src
if ( !This ) if ( !This )
return NULL; return NULL;
This->lpVtbl = &parseError_vtbl; This->IXMLDOMParseError_iface.lpVtbl = &parseError_vtbl;
This->ref = 1; This->ref = 1;
This->code = code; This->code = code;
...@@ -302,5 +302,5 @@ IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR src ...@@ -302,5 +302,5 @@ IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR src
This->linepos = linepos; This->linepos = linepos;
This->filepos = filepos; This->filepos = filepos;
return (IXMLDOMParseError*) &This->lpVtbl; return &This->IXMLDOMParseError_iface;
} }
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