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

Alexandre Julliard julliard at winehq.org
Wed Dec 29 11:14:51 CST 2010


Module: wine
Branch: master
Commit: e53582fdc11226b74c96c796ee1b18ebf9f9ff34
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e53582fdc11226b74c96c796ee1b18ebf9f9ff34

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Wed Dec 29 02:52:22 2010 +0100

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

---

 dlls/msxml3/parseerror.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/msxml3/parseerror.c b/dlls/msxml3/parseerror.c
index d5e4cde..2869907 100644
--- a/dlls/msxml3/parseerror.c
+++ b/dlls/msxml3/parseerror.c
@@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml);
 
 typedef struct
 {
-    const struct IXMLDOMParseErrorVtbl *lpVtbl;
+    IXMLDOMParseError IXMLDOMParseError_iface;
     LONG ref;
     LONG code, line, linepos, filepos;
     BSTR url, reason, srcText;
@@ -47,7 +47,7 @@ typedef struct
 
 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(
@@ -180,8 +180,8 @@ static HRESULT WINAPI parseError_Invoke(
     hr = get_typeinfo(IXMLDOMParseError_tid, &typeinfo);
     if(SUCCEEDED(hr))
     {
-        hr = ITypeInfo_Invoke(typeinfo, &(This->lpVtbl), dispIdMember, wFlags, pDispParams,
-                pVarResult, pExcepInfo, puArgErr);
+        hr = ITypeInfo_Invoke(typeinfo, &This->IXMLDOMParseError_iface, dispIdMember, wFlags,
+                pDispParams, pVarResult, pExcepInfo, puArgErr);
         ITypeInfo_Release(typeinfo);
     }
 
@@ -291,7 +291,7 @@ IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR src
     if ( !This )
         return NULL;
 
-    This->lpVtbl = &parseError_vtbl;
+    This->IXMLDOMParseError_iface.lpVtbl = &parseError_vtbl;
     This->ref = 1;
 
     This->code = code;
@@ -302,5 +302,5 @@ IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR src
     This->linepos = linepos;
     This->filepos = filepos;
 
-    return (IXMLDOMParseError*) &This->lpVtbl;
+    return &This->IXMLDOMParseError_iface;
 }




More information about the wine-cvs mailing list