Nikolay Sivov : msxml3: Fix get_namespaceURI().
Alexandre Julliard
julliard at winehq.org
Wed Nov 16 12:46:45 CST 2011
Module: wine
Branch: master
Commit: 12bb4a471fc0ec01108d19e649dd097382fc9913
URL: http://source.winehq.org/git/wine.git/?a=commit;h=12bb4a471fc0ec01108d19e649dd097382fc9913
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Wed Nov 16 00:28:51 2011 +0300
msxml3: Fix get_namespaceURI().
---
dlls/msxml3/node.c | 9 +++------
dlls/msxml3/tests/domdoc.c | 2 --
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c
index 923a0c2..1df7331 100644
--- a/dlls/msxml3/node.c
+++ b/dlls/msxml3/node.c
@@ -1054,18 +1054,15 @@ HRESULT node_select_singlenode(const xmlnode *This, BSTR query, IXMLDOMNode **no
HRESULT node_get_namespaceURI(xmlnode *This, BSTR *namespaceURI)
{
- xmlNsPtr *ns;
+ xmlNsPtr ns = This->node->ns;
if(!namespaceURI)
return E_INVALIDARG;
*namespaceURI = NULL;
- if ((ns = xmlGetNsList(This->node->doc, This->node)))
- {
- if (ns[0]->href) *namespaceURI = bstr_from_xmlChar( ns[0]->href );
- xmlFree(ns);
- }
+ if (ns && ns->href)
+ *namespaceURI = bstr_from_xmlChar(ns->href);
TRACE("uri: %s\n", debugstr_w(*namespaceURI));
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c
index bad088f..699382f 100644
--- a/dlls/msxml3/tests/domdoc.c
+++ b/dlls/msxml3/tests/domdoc.c
@@ -8712,10 +8712,8 @@ static void test_get_prefix(void)
str = (void*)0xdeadbeef;
hr = IXMLDOMElement_get_namespaceURI(element, &str);
-todo_wine {
EXPECT_HR(hr, S_FALSE);
ok(str == NULL, "got %s\n", wine_dbgstr_w(str));
-}
IXMLDOMDocument_Release(doc);
free_bstrs();
More information about the wine-cvs
mailing list