Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/msxml3/domimpl.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/dlls/msxml3/domimpl.c b/dlls/msxml3/domimpl.c index 74223d5d54e..52f2e40dc9e 100644 --- a/dlls/msxml3/domimpl.c +++ b/dlls/msxml3/domimpl.c @@ -20,13 +20,7 @@
#define COBJMACROS
-#include "config.h" - #include <stdarg.h> -#ifdef HAVE_LIBXML2 -# include <libxml/parser.h> -# include <libxml/xmlerror.h> -#endif
#include "windef.h" #include "winbase.h" @@ -34,12 +28,10 @@ #include "ole2.h" #include "msxml6.h"
-#include "msxml_private.h" +#include "msxml_dispex.h"
#include "wine/debug.h"
-#ifdef HAVE_LIBXML2 - WINE_DEFAULT_DEBUG_CHANNEL(msxml);
typedef struct _domimpl @@ -211,5 +203,3 @@ IUnknown* create_doc_Implementation(void)
return (IUnknown*)&This->IXMLDOMImplementation_iface; } - -#endif
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/msxml3/domdoc.c | 4 +--- dlls/msxml3/domimpl.c | 19 ++++++++++--------- dlls/msxml3/msxml_private.h | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index 10892d40757..e8b5445df19 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -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( diff --git a/dlls/msxml3/domimpl.c b/dlls/msxml3/domimpl.c index 52f2e40dc9e..b7db00f4667 100644 --- a/dlls/msxml3/domimpl.c +++ b/dlls/msxml3/domimpl.c @@ -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; } diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h index d578d5de560..29b1156775c 100644 --- a/dlls/msxml3/msxml_private.h +++ b/dlls/msxml3/msxml_private.h @@ -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;
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/msxml3/domimpl.c | 46 ++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 22 deletions(-)
diff --git a/dlls/msxml3/domimpl.c b/dlls/msxml3/domimpl.c index b7db00f4667..3e5b912efd2 100644 --- a/dlls/msxml3/domimpl.c +++ b/dlls/msxml3/domimpl.c @@ -46,7 +46,7 @@ static inline domimpl *impl_from_IXMLDOMImplementation( IXMLDOMImplementation *i return CONTAINING_RECORD(iface, domimpl, IXMLDOMImplementation_iface); }
-static HRESULT WINAPI dimimpl_QueryInterface( +static HRESULT WINAPI domimpl_QueryInterface( IXMLDOMImplementation *iface, REFIID riid, void** ppvObject ) @@ -76,7 +76,7 @@ static HRESULT WINAPI dimimpl_QueryInterface( return S_OK; }
-static ULONG WINAPI dimimpl_AddRef( +static ULONG WINAPI domimpl_AddRef( IXMLDOMImplementation *iface ) { domimpl *This = impl_from_IXMLDOMImplementation( iface ); @@ -85,7 +85,7 @@ static ULONG WINAPI dimimpl_AddRef( return ref; }
-static ULONG WINAPI dimimpl_Release( +static ULONG WINAPI domimpl_Release( IXMLDOMImplementation *iface ) { domimpl *This = impl_from_IXMLDOMImplementation( iface ); @@ -98,7 +98,7 @@ static ULONG WINAPI dimimpl_Release( return ref; }
-static HRESULT WINAPI dimimpl_GetTypeInfoCount( +static HRESULT WINAPI domimpl_GetTypeInfoCount( IXMLDOMImplementation *iface, UINT* pctinfo ) { @@ -106,7 +106,7 @@ static HRESULT WINAPI dimimpl_GetTypeInfoCount( return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo); }
-static HRESULT WINAPI dimimpl_GetTypeInfo( +static HRESULT WINAPI domimpl_GetTypeInfo( IXMLDOMImplementation *iface, UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo ) @@ -116,7 +116,7 @@ static HRESULT WINAPI dimimpl_GetTypeInfo( iTInfo, lcid, ppTInfo); }
-static HRESULT WINAPI dimimpl_GetIDsOfNames( +static HRESULT WINAPI domimpl_GetIDsOfNames( IXMLDOMImplementation *iface, REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispId ) @@ -126,7 +126,7 @@ static HRESULT WINAPI dimimpl_GetIDsOfNames( riid, rgszNames, cNames, lcid, rgDispId); }
-static HRESULT WINAPI dimimpl_Invoke( +static HRESULT WINAPI domimpl_Invoke( IXMLDOMImplementation *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, @@ -137,7 +137,7 @@ static HRESULT WINAPI dimimpl_Invoke( dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); }
-static HRESULT WINAPI dimimpl_hasFeature(IXMLDOMImplementation* This, BSTR feature, BSTR version, VARIANT_BOOL *hasFeature) +static HRESULT WINAPI domimpl_hasFeature(IXMLDOMImplementation* This, BSTR feature, BSTR version, VARIANT_BOOL *hasFeature) { static const WCHAR bVersion[] = {'1','.','0',0}; static const WCHAR bXML[] = {'X','M','L',0}; @@ -165,28 +165,30 @@ static HRESULT WINAPI dimimpl_hasFeature(IXMLDOMImplementation* This, BSTR featu return S_OK; }
-static const struct IXMLDOMImplementationVtbl dimimpl_vtbl = +static const struct IXMLDOMImplementationVtbl domimpl_vtbl = { - dimimpl_QueryInterface, - dimimpl_AddRef, - dimimpl_Release, - dimimpl_GetTypeInfoCount, - dimimpl_GetTypeInfo, - dimimpl_GetIDsOfNames, - dimimpl_Invoke, - dimimpl_hasFeature + domimpl_QueryInterface, + domimpl_AddRef, + domimpl_Release, + domimpl_GetTypeInfoCount, + domimpl_GetTypeInfo, + domimpl_GetIDsOfNames, + domimpl_Invoke, + domimpl_hasFeature };
-static const tid_t dimimpl_iface_tids[] = { +static const tid_t domimpl_iface_tids[] = +{ IXMLDOMImplementation_tid, 0 };
-static dispex_static_data_t dimimpl_dispex = { +static dispex_static_data_t domimpl_dispex = +{ NULL, IXMLDOMImplementation_tid, NULL, - dimimpl_iface_tids + domimpl_iface_tids };
HRESULT create_dom_implementation(IXMLDOMImplementation **ret) @@ -196,9 +198,9 @@ HRESULT create_dom_implementation(IXMLDOMImplementation **ret) if (!(object = heap_alloc(sizeof(*object)))) return E_OUTOFMEMORY;
- object->IXMLDOMImplementation_iface.lpVtbl = &dimimpl_vtbl; + object->IXMLDOMImplementation_iface.lpVtbl = &domimpl_vtbl; object->ref = 1; - init_dispex(&object->dispex, (IUnknown *)&object->IXMLDOMImplementation_iface, &dimimpl_dispex); + init_dispex(&object->dispex, (IUnknown *)&object->IXMLDOMImplementation_iface, &domimpl_dispex);
*ret = &object->IXMLDOMImplementation_iface;
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/msxml3/xmlparser.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/dlls/msxml3/xmlparser.c b/dlls/msxml3/xmlparser.c index 6fcdb82c56b..0fcb9e34340 100644 --- a/dlls/msxml3/xmlparser.c +++ b/dlls/msxml3/xmlparser.c @@ -19,27 +19,15 @@ */ #define COBJMACROS
-#include "config.h" - #include <stdarg.h> -#ifdef HAVE_LIBXML2 -# include <libxml/parser.h> -# include <libxml/xmlerror.h> -# include <libxml/HTMLtree.h> -#endif - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "ole2.h" -#include "msxml6.h"
-#include "msxml_private.h" +#include "ole2.h"
#include "initguid.h" #include "xmlparser.h"
#include "wine/debug.h" +#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(msxml);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/msxml3/parseerror.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/dlls/msxml3/parseerror.c b/dlls/msxml3/parseerror.c index 2ca0885708d..9fb3ceca9c3 100644 --- a/dlls/msxml3/parseerror.c +++ b/dlls/msxml3/parseerror.c @@ -21,22 +21,12 @@
#define COBJMACROS
-#include "config.h" - #include <stdarg.h> -#ifdef HAVE_LIBXML2 -# include <libxml/parser.h> -# include <libxml/xmlerror.h> -#endif - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winuser.h" + #include "ole2.h" #include "msxml6.h"
-#include "msxml_private.h" +#include "msxml_dispex.h"
#include "wine/debug.h"