msxml3: Move attach_xmlnode.c to domdoc.c.

This commit is contained in:
Michael Karcher 2008-11-29 10:51:58 +01:00 committed by Alexandre Julliard
parent a6594da463
commit b282572ee3
3 changed files with 14 additions and 16 deletions

View File

@ -209,6 +209,20 @@ HRESULT xmldoc_remove_orphan(xmlDocPtr doc, xmlNodePtr node)
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 )
{
return (domdoc *)((char*)iface - FIELD_OFFSET(domdoc, lpVtbl));

View File

@ -54,8 +54,6 @@ extern IUnknown *create_doc_entity_ref( xmlNodePtr entity );
extern HRESULT queryresult_create( xmlNodePtr, LPWSTR, IXMLDOMNodeList ** );
extern void attach_xmlnode( IXMLDOMNode *node, xmlNodePtr xmlnode );
/* data accessors */
xmlNodePtr xmlNodePtr_from_domnode( IXMLDOMNode *iface, xmlElementType type );

View File

@ -85,20 +85,6 @@ xmlNodePtr xmlNodePtr_from_domnode( IXMLDOMNode *iface, xmlElementType type )
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(
IXMLDOMNode *iface,
REFIID riid,