[PATCH 1/4] Remove selectNodes() forward

Nikolay Sivov nsivov at codeweavers.com
Wed Feb 23 05:42:24 CST 2011


---
 dlls/msxml3/attribute.c     |    3 ++-
 dlls/msxml3/cdata.c         |    3 ++-
 dlls/msxml3/comment.c       |    3 ++-
 dlls/msxml3/docfrag.c       |    3 ++-
 dlls/msxml3/domdoc.c        |    7 ++++---
 dlls/msxml3/element.c       |    3 ++-
 dlls/msxml3/entityref.c     |    3 ++-
 dlls/msxml3/msxml_private.h |    1 +
 dlls/msxml3/node.c          |   18 ++++++------------
 dlls/msxml3/pi.c            |    3 ++-
 dlls/msxml3/text.c          |    3 ++-
 11 files changed, 27 insertions(+), 23 deletions(-)

diff --git a/dlls/msxml3/attribute.c b/dlls/msxml3/attribute.c
index 03e0fc9..bb686bf 100644
--- a/dlls/msxml3/attribute.c
+++ b/dlls/msxml3/attribute.c
@@ -483,7 +483,8 @@ static HRESULT WINAPI domattr_selectNodes(
     BSTR p, IXMLDOMNodeList** outList)
 {
     domattr *This = impl_from_IXMLDOMAttribute( iface );
-    return IXMLDOMNode_selectNodes( &This->node.IXMLDOMNode_iface, p, outList );
+    TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outList);
+    return node_select_nodes(&This->node, p, outList);
 }
 
 static HRESULT WINAPI domattr_selectSingleNode(
diff --git a/dlls/msxml3/cdata.c b/dlls/msxml3/cdata.c
index 1eb3597..f30b832 100644
--- a/dlls/msxml3/cdata.c
+++ b/dlls/msxml3/cdata.c
@@ -494,7 +494,8 @@ static HRESULT WINAPI domcdata_selectNodes(
     BSTR p, IXMLDOMNodeList** outList)
 {
     domcdata *This = impl_from_IXMLDOMCDATASection( iface );
-    return IXMLDOMNode_selectNodes( &This->node.IXMLDOMNode_iface, p, outList );
+    TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outList);
+    return node_select_nodes(&This->node, p, outList);
 }
 
 static HRESULT WINAPI domcdata_selectSingleNode(
diff --git a/dlls/msxml3/comment.c b/dlls/msxml3/comment.c
index e7d6ba1..a77399c 100644
--- a/dlls/msxml3/comment.c
+++ b/dlls/msxml3/comment.c
@@ -487,7 +487,8 @@ static HRESULT WINAPI domcomment_selectNodes(
     BSTR p, IXMLDOMNodeList** outList)
 {
     domcomment *This = impl_from_IXMLDOMComment( iface );
-    return IXMLDOMNode_selectNodes( &This->node.IXMLDOMNode_iface, p, outList );
+    TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outList);
+    return node_select_nodes(&This->node, p, outList);
 }
 
 static HRESULT WINAPI domcomment_selectSingleNode(
diff --git a/dlls/msxml3/docfrag.c b/dlls/msxml3/docfrag.c
index 9600176..756a160 100644
--- a/dlls/msxml3/docfrag.c
+++ b/dlls/msxml3/docfrag.c
@@ -491,7 +491,8 @@ static HRESULT WINAPI domfrag_selectNodes(
     BSTR p, IXMLDOMNodeList** outList)
 {
     domfrag *This = impl_from_IXMLDOMDocumentFragment( iface );
-    return IXMLDOMNode_selectNodes( &This->node.IXMLDOMNode_iface, p, outList );
+    TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outList);
+    return node_select_nodes(&This->node, p, outList);
 }
 
 static HRESULT WINAPI domfrag_selectSingleNode(
diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index d2ea36e..b1e47cd 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -1438,11 +1438,12 @@ static HRESULT WINAPI domdoc_transformNode(
 
 static HRESULT WINAPI domdoc_selectNodes(
     IXMLDOMDocument3 *iface,
-    BSTR queryString,
-    IXMLDOMNodeList** resultList )
+    BSTR p,
+    IXMLDOMNodeList **outList)
 {
     domdoc *This = impl_from_IXMLDOMDocument3( iface );
-    return IXMLDOMNode_selectNodes( &This->node.IXMLDOMNode_iface, queryString, resultList );
+    TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outList);
+    return node_select_nodes(&This->node, p, outList);
 }
 
 
diff --git a/dlls/msxml3/element.c b/dlls/msxml3/element.c
index c1f3564..f007ead 100644
--- a/dlls/msxml3/element.c
+++ b/dlls/msxml3/element.c
@@ -943,7 +943,8 @@ static HRESULT WINAPI domelem_selectNodes(
     BSTR p, IXMLDOMNodeList** outList)
 {
     domelem *This = impl_from_IXMLDOMElement( iface );
-    return IXMLDOMNode_selectNodes( &This->node.IXMLDOMNode_iface, p, outList );
+    TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outList);
+    return node_select_nodes(&This->node, p, outList);
 }
 
 static HRESULT WINAPI domelem_selectSingleNode(
diff --git a/dlls/msxml3/entityref.c b/dlls/msxml3/entityref.c
index 4231c7e..acb050b 100644
--- a/dlls/msxml3/entityref.c
+++ b/dlls/msxml3/entityref.c
@@ -485,7 +485,8 @@ static HRESULT WINAPI entityref_selectNodes(
     BSTR p, IXMLDOMNodeList** outList)
 {
     entityref *This = impl_from_IXMLDOMEntityReference( iface );
-    return IXMLDOMNode_selectNodes( &This->node.IXMLDOMNode_iface, p, outList );
+    TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outList);
+    return node_select_nodes(&This->node, p, outList);
 }
 
 static HRESULT WINAPI entityref_selectSingleNode(
diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h
index 65e10bf..b3a3524 100644
--- a/dlls/msxml3/msxml_private.h
+++ b/dlls/msxml3/msxml_private.h
@@ -276,6 +276,7 @@ extern HRESULT node_remove_child(xmlnode*,IXMLDOMNode*,IXMLDOMNode**);
 extern HRESULT node_has_childnodes(const xmlnode*,VARIANT_BOOL*);
 extern HRESULT node_get_owner_doc(const xmlnode*,IXMLDOMDocument**);
 extern HRESULT node_get_text(const xmlnode*,BSTR*);
+extern HRESULT node_select_nodes(const xmlnode*,BSTR,IXMLDOMNodeList**);
 
 extern HRESULT get_domdoc_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3 **document);
 
diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c
index aa181a9..c1ebbc2 100644
--- a/dlls/msxml3/node.c
+++ b/dlls/msxml3/node.c
@@ -1009,21 +1009,15 @@ static HRESULT WINAPI xmlnode_transformNode(
 #endif
 }
 
-static HRESULT WINAPI xmlnode_selectNodes(
-    IXMLDOMNode *iface,
-    BSTR queryString,
-    IXMLDOMNodeList** resultList)
+HRESULT node_select_nodes(const xmlnode *This, BSTR query, IXMLDOMNodeList **nodes)
 {
-    xmlnode *This = impl_from_IXMLDOMNode( iface );
     xmlChar* str;
     HRESULT hr;
 
-    TRACE("(%p)->(%s %p)\n", This, debugstr_w(queryString), resultList );
+    if (!query || !nodes) return E_INVALIDARG;
 
-    if (!queryString || !resultList) return E_INVALIDARG;
-
-    str = xmlChar_from_wchar(queryString);
-    hr = queryresult_create(This->node, str, resultList);
+    str = xmlChar_from_wchar(query);
+    hr = queryresult_create(This->node, str, nodes);
     heap_free(str);
 
     return hr;
@@ -1138,7 +1132,7 @@ static const struct IXMLDOMNodeVtbl xmlnode_vtbl =
     NULL,
     NULL,
     xmlnode_transformNode,
-    xmlnode_selectNodes,
+    NULL,
     xmlnode_selectSingleNode
 };
 
@@ -1609,7 +1603,7 @@ static HRESULT WINAPI unknode_selectNodes(
     BSTR p, IXMLDOMNodeList** outList)
 {
     unknode *This = unknode_from_IXMLDOMNode( iface );
-    return IXMLDOMNode_selectNodes( &This->node.IXMLDOMNode_iface, p, outList );
+    return node_select_nodes(&This->node, p, outList);
 }
 
 static HRESULT WINAPI unknode_selectSingleNode(
diff --git a/dlls/msxml3/pi.c b/dlls/msxml3/pi.c
index 5e87e49..cadfa04 100644
--- a/dlls/msxml3/pi.c
+++ b/dlls/msxml3/pi.c
@@ -502,7 +502,8 @@ static HRESULT WINAPI dom_pi_selectNodes(
     BSTR p, IXMLDOMNodeList** outList)
 {
     dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
-    return IXMLDOMNode_selectNodes( &This->node.IXMLDOMNode_iface, p, outList );
+    TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outList);
+    return node_select_nodes(&This->node, p, outList);
 }
 
 static HRESULT WINAPI dom_pi_selectSingleNode(
diff --git a/dlls/msxml3/text.c b/dlls/msxml3/text.c
index c8a0186..1904678 100644
--- a/dlls/msxml3/text.c
+++ b/dlls/msxml3/text.c
@@ -572,7 +572,8 @@ static HRESULT WINAPI domtext_selectNodes(
     BSTR p, IXMLDOMNodeList** outList)
 {
     domtext *This = impl_from_IXMLDOMText( iface );
-    return IXMLDOMNode_selectNodes( &This->node.IXMLDOMNode_iface, p, outList );
+    TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outList);
+    return node_select_nodes(&This->node, p, outList);
 }
 
 static HRESULT WINAPI domtext_selectSingleNode(
-- 
1.5.6.5



--------------020000080606070705090401--



More information about the wine-patches mailing list