Nikolay Sivov : msxml3: Remove selectNodes() forward.

Alexandre Julliard julliard at winehq.org
Thu Feb 24 11:43:25 CST 2011


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Feb 23 14:42:24 2011 +0300

msxml3: Remove selectNodes() forward.

---

 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 908c604..a2775b3 100644
--- a/dlls/msxml3/attribute.c
+++ b/dlls/msxml3/attribute.c
@@ -489,7 +489,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 3a22247..7dc72a4 100644
--- a/dlls/msxml3/cdata.c
+++ b/dlls/msxml3/cdata.c
@@ -499,7 +499,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 66d8000..378379d 100644
--- a/dlls/msxml3/comment.c
+++ b/dlls/msxml3/comment.c
@@ -492,7 +492,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 70d6925..bf480d6 100644
--- a/dlls/msxml3/docfrag.c
+++ b/dlls/msxml3/docfrag.c
@@ -496,7 +496,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 f1b8919..3463913 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -1442,11 +1442,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 ec3b74c..bbcc302 100644
--- a/dlls/msxml3/element.c
+++ b/dlls/msxml3/element.c
@@ -948,7 +948,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 f1f8306..2c23c66 100644
--- a/dlls/msxml3/entityref.c
+++ b/dlls/msxml3/entityref.c
@@ -490,7 +490,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 8f99981..fdf4575 100644
--- a/dlls/msxml3/msxml_private.h
+++ b/dlls/msxml3/msxml_private.h
@@ -268,6 +268,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 ac156a5..6ea3250 100644
--- a/dlls/msxml3/node.c
+++ b/dlls/msxml3/node.c
@@ -1032,21 +1032,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;
@@ -1161,7 +1155,7 @@ static const struct IXMLDOMNodeVtbl xmlnode_vtbl =
     NULL,
     NULL,
     xmlnode_transformNode,
-    xmlnode_selectNodes,
+    NULL,
     xmlnode_selectSingleNode
 };
 
@@ -1632,7 +1626,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 2427d8e..27c41c1 100644
--- a/dlls/msxml3/pi.c
+++ b/dlls/msxml3/pi.c
@@ -507,7 +507,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 708ade0..ca11387 100644
--- a/dlls/msxml3/text.c
+++ b/dlls/msxml3/text.c
@@ -577,7 +577,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(




More information about the wine-cvs mailing list