Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7f84185a
Commit
7f84185a
authored
Jul 08, 2008
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Split DOMDocument_create.
parent
8221a650
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
16 deletions
+25
-16
domdoc.c
dlls/msxml3/domdoc.c
+23
-16
msxml_private.h
dlls/msxml3/msxml_private.h
+2
-0
No files found.
dlls/msxml3/domdoc.c
View file @
7f84185a
...
@@ -2200,13 +2200,10 @@ static const IObjectSafetyVtbl domdocObjectSafetyVtbl = {
...
@@ -2200,13 +2200,10 @@ static const IObjectSafetyVtbl domdocObjectSafetyVtbl = {
xmldoc_Safety_SetInterfaceSafetyOptions
xmldoc_Safety_SetInterfaceSafetyOptions
};
};
HRESULT
DOMDocument_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
HRESULT
DOMDocument_create
_from_xmldoc
(
xmlDocPtr
xmldoc
,
IXMLDOMDocument2
**
document
)
{
{
domdoc
*
doc
;
domdoc
*
doc
;
HRESULT
hr
;
HRESULT
hr
;
xmlDocPtr
xmldoc
;
TRACE
(
"(%p,%p)
\n
"
,
pUnkOuter
,
ppObj
);
doc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
doc
)
);
doc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
doc
)
);
if
(
!
doc
)
if
(
!
doc
)
...
@@ -2229,19 +2226,9 @@ HRESULT DOMDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj)
...
@@ -2229,19 +2226,9 @@ HRESULT DOMDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj)
doc
->
safeopt
=
0
;
doc
->
safeopt
=
0
;
doc
->
bsc
=
NULL
;
doc
->
bsc
=
NULL
;
xmldoc
=
xmlNewDoc
(
NULL
);
if
(
!
xmldoc
)
{
HeapFree
(
GetProcessHeap
(),
0
,
doc
);
return
E_OUTOFMEMORY
;
}
xmldoc
->
_private
=
0
;
doc
->
node_unk
=
create_basic_node
(
(
xmlNodePtr
)
xmldoc
,
(
IUnknown
*
)
&
doc
->
lpVtbl
);
doc
->
node_unk
=
create_basic_node
(
(
xmlNodePtr
)
xmldoc
,
(
IUnknown
*
)
&
doc
->
lpVtbl
);
if
(
!
doc
->
node_unk
)
if
(
!
doc
->
node_unk
)
{
{
xmlFreeDoc
(
xmldoc
);
HeapFree
(
GetProcessHeap
(),
0
,
doc
);
HeapFree
(
GetProcessHeap
(),
0
,
doc
);
return
E_FAIL
;
return
E_FAIL
;
}
}
...
@@ -2256,12 +2243,32 @@ HRESULT DOMDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj)
...
@@ -2256,12 +2243,32 @@ HRESULT DOMDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj)
/* The ref on doc->node is actually looped back into this object, so release it */
/* The ref on doc->node is actually looped back into this object, so release it */
IXMLDOMNode_Release
(
doc
->
node
);
IXMLDOMNode_Release
(
doc
->
node
);
*
ppObj
=
&
doc
->
lpVtbl
;
*
document
=
(
IXMLDOMDocument2
*
)
&
doc
->
lpVtbl
;
TRACE
(
"returning iface %p
\n
"
,
*
ppObj
);
TRACE
(
"returning iface %p
\n
"
,
*
document
);
return
S_OK
;
return
S_OK
;
}
}
HRESULT
DOMDocument_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
{
xmlDocPtr
xmldoc
;
HRESULT
hr
;
TRACE
(
"(%p,%p)
\n
"
,
pUnkOuter
,
ppObj
);
xmldoc
=
xmlNewDoc
(
NULL
);
if
(
!
xmldoc
)
return
E_OUTOFMEMORY
;
xmldoc
->
_private
=
0
;
hr
=
DOMDocument_create_from_xmldoc
(
xmldoc
,
(
IXMLDOMDocument2
**
)
ppObj
);
if
(
FAILED
(
hr
))
xmlFreeDoc
(
xmldoc
);
return
hr
;
}
#else
#else
HRESULT
DOMDocument_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
HRESULT
DOMDocument_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
...
...
dlls/msxml3/msxml_private.h
View file @
7f84185a
...
@@ -91,6 +91,8 @@ extern HRESULT SchemaCache_create( IUnknown *pUnkOuter, LPVOID *ppObj );
...
@@ -91,6 +91,8 @@ extern HRESULT SchemaCache_create( IUnknown *pUnkOuter, LPVOID *ppObj );
extern
HRESULT
XMLDocument_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
);
extern
HRESULT
XMLDocument_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
);
extern
HRESULT
SAXXMLReader_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
);
extern
HRESULT
SAXXMLReader_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
);
extern
HRESULT
DOMDocument_create_from_xmldoc
(
xmlDocPtr
xmldoc
,
IXMLDOMDocument2
**
document
);
/* typelibs */
/* typelibs */
enum
tid_t
{
enum
tid_t
{
IXMLDOMAttribute_tid
,
IXMLDOMAttribute_tid
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment