mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 11:43:37 +00:00
msxml3/domimpl: Cleanup object creation helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2cc7180f3c
commit
24d81667dc
|
@ -1642,9 +1642,7 @@ static HRESULT WINAPI domdoc_get_implementation(
|
|||
if(!impl)
|
||||
return E_INVALIDARG;
|
||||
|
||||
*impl = (IXMLDOMImplementation*)create_doc_Implementation();
|
||||
|
||||
return S_OK;
|
||||
return create_dom_implementation(impl);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domdoc_get_documentElement(
|
||||
|
|
|
@ -189,17 +189,18 @@ static dispex_static_data_t dimimpl_dispex = {
|
|||
dimimpl_iface_tids
|
||||
};
|
||||
|
||||
IUnknown* create_doc_Implementation(void)
|
||||
HRESULT create_dom_implementation(IXMLDOMImplementation **ret)
|
||||
{
|
||||
domimpl *This;
|
||||
domimpl *object;
|
||||
|
||||
This = heap_alloc( sizeof *This );
|
||||
if ( !This )
|
||||
return NULL;
|
||||
if (!(object = heap_alloc(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
This->IXMLDOMImplementation_iface.lpVtbl = &dimimpl_vtbl;
|
||||
This->ref = 1;
|
||||
init_dispex(&This->dispex, (IUnknown*)&This->IXMLDOMImplementation_iface, &dimimpl_dispex);
|
||||
object->IXMLDOMImplementation_iface.lpVtbl = &dimimpl_vtbl;
|
||||
object->ref = 1;
|
||||
init_dispex(&object->dispex, (IUnknown *)&object->IXMLDOMImplementation_iface, &dimimpl_dispex);
|
||||
|
||||
return (IUnknown*)&This->IXMLDOMImplementation_iface;
|
||||
*ret = &object->IXMLDOMImplementation_iface;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -180,12 +180,12 @@ extern IUnknown *create_comment( xmlNodePtr ) DECLSPEC_HIDDEN;
|
|||
extern IUnknown *create_cdata( xmlNodePtr ) DECLSPEC_HIDDEN;
|
||||
extern IXMLDOMNodeList *create_children_nodelist( xmlNodePtr ) DECLSPEC_HIDDEN;
|
||||
extern IXMLDOMNamedNodeMap *create_nodemap( xmlNodePtr, const struct nodemap_funcs* ) DECLSPEC_HIDDEN;
|
||||
extern IUnknown *create_doc_Implementation(void) DECLSPEC_HIDDEN;
|
||||
extern IUnknown *create_doc_fragment( xmlNodePtr ) DECLSPEC_HIDDEN;
|
||||
extern IUnknown *create_doc_entity_ref( xmlNodePtr ) DECLSPEC_HIDDEN;
|
||||
extern IUnknown *create_doc_type( xmlNodePtr ) DECLSPEC_HIDDEN;
|
||||
extern HRESULT create_selection( xmlNodePtr, xmlChar*, IXMLDOMNodeList** ) DECLSPEC_HIDDEN;
|
||||
extern HRESULT create_enumvariant( IUnknown*, BOOL, const struct enumvariant_funcs*, IEnumVARIANT**) DECLSPEC_HIDDEN;
|
||||
extern HRESULT create_dom_implementation(IXMLDOMImplementation **obj) DECLSPEC_HIDDEN;
|
||||
|
||||
/* data accessors */
|
||||
xmlNodePtr xmlNodePtr_from_domnode( IXMLDOMNode *iface, xmlElementType type ) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in a new issue