Commit b282572e authored by Michael Karcher's avatar Michael Karcher Committed by Alexandre Julliard

msxml3: Move attach_xmlnode.c to domdoc.c.

parent a6594da4
...@@ -209,6 +209,20 @@ HRESULT xmldoc_remove_orphan(xmlDocPtr doc, xmlNodePtr node) ...@@ -209,6 +209,20 @@ HRESULT xmldoc_remove_orphan(xmlDocPtr doc, xmlNodePtr node)
return S_FALSE; return S_FALSE;
} }
static void attach_xmlnode( IXMLDOMNode *node, xmlNodePtr xml )
{
xmlnode *This = impl_from_IXMLDOMNode( node );
if(This->node)
xmldoc_release(This->node->doc);
This->node = xml;
if(This->node)
xmldoc_add_ref(This->node->doc);
return;
}
static inline domdoc *impl_from_IXMLDOMDocument2( IXMLDOMDocument2 *iface ) static inline domdoc *impl_from_IXMLDOMDocument2( IXMLDOMDocument2 *iface )
{ {
return (domdoc *)((char*)iface - FIELD_OFFSET(domdoc, lpVtbl)); return (domdoc *)((char*)iface - FIELD_OFFSET(domdoc, lpVtbl));
......
...@@ -54,8 +54,6 @@ extern IUnknown *create_doc_entity_ref( xmlNodePtr entity ); ...@@ -54,8 +54,6 @@ extern IUnknown *create_doc_entity_ref( xmlNodePtr entity );
extern HRESULT queryresult_create( xmlNodePtr, LPWSTR, IXMLDOMNodeList ** ); extern HRESULT queryresult_create( xmlNodePtr, LPWSTR, IXMLDOMNodeList ** );
extern void attach_xmlnode( IXMLDOMNode *node, xmlNodePtr xmlnode );
/* data accessors */ /* data accessors */
xmlNodePtr xmlNodePtr_from_domnode( IXMLDOMNode *iface, xmlElementType type ); xmlNodePtr xmlNodePtr_from_domnode( IXMLDOMNode *iface, xmlElementType type );
......
...@@ -85,20 +85,6 @@ xmlNodePtr xmlNodePtr_from_domnode( IXMLDOMNode *iface, xmlElementType type ) ...@@ -85,20 +85,6 @@ xmlNodePtr xmlNodePtr_from_domnode( IXMLDOMNode *iface, xmlElementType type )
return This->node; return This->node;
} }
void attach_xmlnode( IXMLDOMNode *node, xmlNodePtr xml )
{
xmlnode *This = impl_from_IXMLDOMNode( node );
if(This->node)
xmldoc_release(This->node->doc);
This->node = xml;
if(This->node)
xmldoc_add_ref(This->node->doc);
return;
}
static HRESULT WINAPI xmlnode_QueryInterface( static HRESULT WINAPI xmlnode_QueryInterface(
IXMLDOMNode *iface, IXMLDOMNode *iface,
REFIID riid, REFIID riid,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment