>From b83ef97709ed7c4b3361c745bf1aea7eee619457 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov@codeweavers.com>
Date: Tue, 24 Jan 2012 11:02:35 +0300
Subject: [PATCH 3/3] Internally call methods with interface macros

---
 dlls/msxml3/domdoc.c |   40 ++++++++++++++++++++--------------------
 dlls/msxml3/pi.c     |   22 +++++++++++-----------
 dlls/msxml3/text.c   |    8 ++++----
 3 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index 8aa1a21..1ae0d56 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -672,28 +672,28 @@ static inline domdoc *impl_from_IConnectionPointContainer(IConnectionPointContai
 /************************************************************************
  * domdoc implementation of IPersistStream.
  */
-static HRESULT WINAPI domdoc_IPersistStreamInit_QueryInterface(
+static HRESULT WINAPI PersistStreamInit_QueryInterface(
     IPersistStreamInit *iface, REFIID riid, void **ppvObj)
 {
     domdoc* This = impl_from_IPersistStreamInit(iface);
     return IXMLDOMDocument3_QueryInterface(&This->IXMLDOMDocument3_iface, riid, ppvObj);
 }
 
-static ULONG WINAPI domdoc_IPersistStreamInit_AddRef(
+static ULONG WINAPI PersistStreamInit_AddRef(
     IPersistStreamInit *iface)
 {
     domdoc* This = impl_from_IPersistStreamInit(iface);
     return IXMLDOMDocument3_AddRef(&This->IXMLDOMDocument3_iface);
 }
 
-static ULONG WINAPI domdoc_IPersistStreamInit_Release(
+static ULONG WINAPI PersistStreamInit_Release(
     IPersistStreamInit *iface)
 {
     domdoc* This = impl_from_IPersistStreamInit(iface);
     return IXMLDOMDocument3_Release(&This->IXMLDOMDocument3_iface);
 }
 
-static HRESULT WINAPI domdoc_IPersistStreamInit_GetClassID(
+static HRESULT WINAPI PersistStreamInit_GetClassID(
     IPersistStreamInit *iface, CLSID *classid)
 {
     domdoc* This = impl_from_IPersistStreamInit(iface);
@@ -707,7 +707,7 @@ static HRESULT WINAPI domdoc_IPersistStreamInit_GetClassID(
     return S_OK;
 }
 
-static HRESULT WINAPI domdoc_IPersistStreamInit_IsDirty(
+static HRESULT WINAPI PersistStreamInit_IsDirty(
     IPersistStreamInit *iface)
 {
     domdoc *This = impl_from_IPersistStreamInit(iface);
@@ -715,7 +715,7 @@ static HRESULT WINAPI domdoc_IPersistStreamInit_IsDirty(
     return S_FALSE;
 }
 
-static HRESULT WINAPI domdoc_IPersistStreamInit_Load(
+static HRESULT WINAPI PersistStreamInit_Load(
     IPersistStreamInit *iface, LPSTREAM pStm)
 {
     domdoc *This = impl_from_IPersistStreamInit(iface);
@@ -768,7 +768,7 @@ static HRESULT WINAPI domdoc_IPersistStreamInit_Load(
     return attach_xmldoc(This, xmldoc);
 }
 
-static HRESULT WINAPI domdoc_IPersistStreamInit_Save(
+static HRESULT WINAPI PersistStreamInit_Save(
     IPersistStreamInit *iface, IStream *stream, BOOL clr_dirty)
 {
     domdoc *This = impl_from_IPersistStreamInit(iface);
@@ -791,7 +791,7 @@ static HRESULT WINAPI domdoc_IPersistStreamInit_Save(
     return hr;
 }
 
-static HRESULT WINAPI domdoc_IPersistStreamInit_GetSizeMax(
+static HRESULT WINAPI PersistStreamInit_GetSizeMax(
     IPersistStreamInit *iface, ULARGE_INTEGER *pcbSize)
 {
     domdoc *This = impl_from_IPersistStreamInit(iface);
@@ -799,7 +799,7 @@ static HRESULT WINAPI domdoc_IPersistStreamInit_GetSizeMax(
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI domdoc_IPersistStreamInit_InitNew(
+static HRESULT WINAPI PersistStreamInit_InitNew(
     IPersistStreamInit *iface)
 {
     domdoc *This = impl_from_IPersistStreamInit(iface);
@@ -809,15 +809,15 @@ static HRESULT WINAPI domdoc_IPersistStreamInit_InitNew(
 
 static const IPersistStreamInitVtbl xmldoc_IPersistStreamInit_VTable =
 {
-    domdoc_IPersistStreamInit_QueryInterface,
-    domdoc_IPersistStreamInit_AddRef,
-    domdoc_IPersistStreamInit_Release,
-    domdoc_IPersistStreamInit_GetClassID,
-    domdoc_IPersistStreamInit_IsDirty,
-    domdoc_IPersistStreamInit_Load,
-    domdoc_IPersistStreamInit_Save,
-    domdoc_IPersistStreamInit_GetSizeMax,
-    domdoc_IPersistStreamInit_InitNew
+    PersistStreamInit_QueryInterface,
+    PersistStreamInit_AddRef,
+    PersistStreamInit_Release,
+    PersistStreamInit_GetClassID,
+    PersistStreamInit_IsDirty,
+    PersistStreamInit_Load,
+    PersistStreamInit_Save,
+    PersistStreamInit_GetSizeMax,
+    PersistStreamInit_InitNew
 };
 
 /* IXMLDOMDocument3 interface */
@@ -2665,7 +2665,7 @@ static HRESULT WINAPI domdoc_validateNode(
     int validated = 0;
 
     TRACE("(%p)->(%p, %p)\n", This, node, err);
-    domdoc_get_readyState(iface, &state);
+    IXMLDOMDocument3_get_readyState(iface, &state);
     if (state != READYSTATE_COMPLETE)
     {
         if (err)
@@ -2760,7 +2760,7 @@ static HRESULT WINAPI domdoc_validate(
 {
     domdoc *This = impl_from_IXMLDOMDocument3( iface );
     TRACE("(%p)->(%p)\n", This, err);
-    return domdoc_validateNode(iface, (IXMLDOMNode*)iface, err);
+    return IXMLDOMDocument3_validateNode(iface, (IXMLDOMNode*)iface, err);
 }
 
 static HRESULT WINAPI domdoc_setProperty(
diff --git a/dlls/msxml3/pi.c b/dlls/msxml3/pi.c
index 332d97c..36ff563 100644
--- a/dlls/msxml3/pi.c
+++ b/dlls/msxml3/pi.c
@@ -222,23 +222,23 @@ static HRESULT WINAPI dom_pi_put_nodeValue(
     VARIANT value)
 {
     dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
-    BSTR sTarget;
+    BSTR target;
     HRESULT hr;
 
     TRACE("(%p)->(%s)\n", This, debugstr_variant(&value));
 
     /* Cannot set data to a PI node whose target is 'xml' */
-    hr = dom_pi_get_nodeName(iface, &sTarget);
+    hr = IXMLDOMProcessingInstruction_get_nodeName(iface, &target);
     if(hr == S_OK)
     {
         static const WCHAR xmlW[] = {'x','m','l',0};
-        if(lstrcmpW( sTarget, xmlW) == 0)
+        if(!strcmpW(target, xmlW))
         {
-            SysFreeString(sTarget);
+            SysFreeString(target);
             return E_FAIL;
         }
 
-        SysFreeString(sTarget);
+        SysFreeString(target);
     }
 
     return node_put_value(&This->node, &value);
@@ -637,24 +637,24 @@ static HRESULT WINAPI dom_pi_put_data(
     BSTR data)
 {
     dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
-    HRESULT hr;
     VARIANT val;
-    BSTR sTarget;
+    BSTR target;
+    HRESULT hr;
 
     TRACE("(%p)->(%s)\n", This, debugstr_w(data) );
 
     /* Cannot set data to a PI node whose target is 'xml' */
-    hr = dom_pi_get_nodeName(iface, &sTarget);
+    hr = IXMLDOMProcessingInstruction_get_nodeName(iface, &target);
     if(hr == S_OK)
     {
         static const WCHAR xmlW[] = {'x','m','l',0};
-        if(lstrcmpW( sTarget, xmlW) == 0)
+        if(!strcmpW(target, xmlW))
         {
-            SysFreeString(sTarget);
+            SysFreeString(target);
             return E_FAIL;
         }
 
-        SysFreeString(sTarget);
+        SysFreeString(target);
     }
 
     V_VT(&val) = VT_BSTR;
diff --git a/dlls/msxml3/text.c b/dlls/msxml3/text.c
index abf11b3..74de8e5 100644
--- a/dlls/msxml3/text.c
+++ b/dlls/msxml3/text.c
@@ -406,7 +406,7 @@ static HRESULT WINAPI domtext_get_nodeTypedValue(
     if (!var1)
         return E_INVALIDARG;
 
-    hr = domtext_get_parentNode(iface, &parent);
+    hr = IXMLDOMText_get_parentNode(iface, &parent);
 
     if (hr == S_OK)
     {
@@ -433,7 +433,7 @@ static HRESULT WINAPI domtext_put_nodeTypedValue(
 
     TRACE("(%p)->(%s)\n", This, debugstr_variant(&value));
 
-    hr = domtext_get_parentNode(iface, &parent);
+    hr = IXMLDOMText_get_parentNode(iface, &parent);
 
     if (hr == S_OK)
     {
@@ -461,7 +461,7 @@ static HRESULT WINAPI domtext_get_dataType(
     if (!dtName)
         return E_INVALIDARG;
 
-    hr = domtext_get_parentNode(iface, &parent);
+    hr = IXMLDOMText_get_parentNode(iface, &parent);
 
     if (hr == S_OK)
     {
@@ -491,7 +491,7 @@ static HRESULT WINAPI domtext_put_dataType(
     if (!dtName)
         return E_INVALIDARG;
 
-    hr = domtext_get_parentNode(iface, &parent);
+    hr = IXMLDOMText_get_parentNode(iface, &parent);
 
     if (hr == S_OK)
     {
-- 
1.5.6.5


