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
d48246e1
Commit
d48246e1
authored
Aug 21, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Return xmlnode object from create_basic_node.
parent
85201ceb
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
55 additions
and
113 deletions
+55
-113
attribute.c
dlls/msxml3/attribute.c
+5
-12
cdata.c
dlls/msxml3/cdata.c
+5
-12
comment.c
dlls/msxml3/comment.c
+5
-12
docfrag.c
dlls/msxml3/docfrag.c
+5
-12
domdoc.c
dlls/msxml3/domdoc.c
+5
-13
element.c
dlls/msxml3/element.c
+5
-12
entityref.c
dlls/msxml3/entityref.c
+5
-12
msxml_private.h
dlls/msxml3/msxml_private.h
+7
-1
node.c
dlls/msxml3/node.c
+3
-3
pi.c
dlls/msxml3/pi.c
+5
-12
text.c
dlls/msxml3/text.c
+5
-12
No files found.
dlls/msxml3/attribute.c
View file @
d48246e1
...
...
@@ -547,7 +547,7 @@ static const struct IXMLDOMAttributeVtbl domattr_vtbl =
IUnknown
*
create_attribute
(
xmlNodePtr
attribute
)
{
domattr
*
This
;
HRESULT
hr
;
xmlnode
*
node
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
*
This
);
if
(
!
This
)
...
...
@@ -556,22 +556,15 @@ IUnknown* create_attribute( xmlNodePtr attribute )
This
->
lpVtbl
=
&
domattr_vtbl
;
This
->
ref
=
1
;
This
->
node_unk
=
create_basic_node
(
attribute
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
This
->
node_unk
)
node
=
create_basic_node
(
attribute
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
node
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
hr
=
IUnknown_QueryInterface
(
This
->
node_unk
,
&
IID_IXMLDOMNode
,
(
LPVOID
*
)
&
This
->
node
);
if
(
FAILED
(
hr
))
{
IUnknown_Release
(
This
->
node_unk
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
/* The ref on This->node is actually looped back into this object, so release it */
IXMLDOMNode_Release
(
This
->
node
);
This
->
node_unk
=
(
IUnknown
*
)
&
node
->
lpInternalUnkVtbl
;
This
->
node
=
IXMLDOMNode_from_impl
(
node
);
return
(
IUnknown
*
)
&
This
->
lpVtbl
;
}
...
...
dlls/msxml3/cdata.c
View file @
d48246e1
...
...
@@ -770,7 +770,7 @@ static const struct IXMLDOMCDATASectionVtbl domcdata_vtbl =
IUnknown
*
create_cdata
(
xmlNodePtr
text
)
{
domcdata
*
This
;
HRESULT
hr
;
xmlnode
*
node
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
*
This
);
if
(
!
This
)
...
...
@@ -779,22 +779,15 @@ IUnknown* create_cdata( xmlNodePtr text )
This
->
lpVtbl
=
&
domcdata_vtbl
;
This
->
ref
=
1
;
This
->
node_unk
=
create_basic_node
(
text
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
This
->
node_unk
)
node
=
create_basic_node
(
text
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
node
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
hr
=
IUnknown_QueryInterface
(
This
->
node_unk
,
&
IID_IXMLDOMNode
,
(
LPVOID
*
)
&
This
->
node
);
if
(
FAILED
(
hr
))
{
IUnknown_Release
(
This
->
node_unk
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
/* The ref on This->node is actually looped back into this object, so release it */
IXMLDOMNode_Release
(
This
->
node
);
This
->
node_unk
=
(
IUnknown
*
)
&
node
->
lpInternalUnkVtbl
;
This
->
node
=
IXMLDOMNode_from_impl
(
node
);
return
(
IUnknown
*
)
&
This
->
lpVtbl
;
}
...
...
dlls/msxml3/comment.c
View file @
d48246e1
...
...
@@ -768,7 +768,7 @@ static const struct IXMLDOMCommentVtbl domcomment_vtbl =
IUnknown
*
create_comment
(
xmlNodePtr
comment
)
{
domcomment
*
This
;
HRESULT
hr
;
xmlnode
*
node
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
*
This
);
if
(
!
This
)
...
...
@@ -777,22 +777,15 @@ IUnknown* create_comment( xmlNodePtr comment )
This
->
lpVtbl
=
&
domcomment_vtbl
;
This
->
ref
=
1
;
This
->
node_unk
=
create_basic_node
(
comment
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
This
->
node_unk
)
node
=
create_basic_node
(
comment
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
node
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
hr
=
IUnknown_QueryInterface
(
This
->
node_unk
,
&
IID_IXMLDOMNode
,
(
LPVOID
*
)
&
This
->
node
);
if
(
FAILED
(
hr
))
{
IUnknown_Release
(
This
->
node_unk
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
/* The ref on This->node is actually looped back into this object, so release it */
IXMLDOMNode_Release
(
This
->
node
);
This
->
node_unk
=
(
IUnknown
*
)
&
node
->
lpInternalUnkVtbl
;
This
->
node
=
IXMLDOMNode_from_impl
(
node
);
return
(
IUnknown
*
)
&
This
->
lpVtbl
;
}
...
...
dlls/msxml3/docfrag.c
View file @
d48246e1
...
...
@@ -520,7 +520,7 @@ static const struct IXMLDOMDocumentFragmentVtbl domfrag_vtbl =
IUnknown
*
create_doc_fragment
(
xmlNodePtr
fragment
)
{
domfrag
*
This
;
HRESULT
hr
;
xmlnode
*
node
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
*
This
);
if
(
!
This
)
...
...
@@ -529,22 +529,15 @@ IUnknown* create_doc_fragment( xmlNodePtr fragment )
This
->
lpVtbl
=
&
domfrag_vtbl
;
This
->
ref
=
1
;
This
->
node_unk
=
create_basic_node
(
fragment
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
This
->
node_unk
)
node
=
create_basic_node
(
fragment
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
node
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
hr
=
IUnknown_QueryInterface
(
This
->
node_unk
,
&
IID_IXMLDOMNode
,
(
LPVOID
*
)
&
This
->
node
);
if
(
FAILED
(
hr
))
{
IUnknown_Release
(
This
->
node_unk
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
/* The ref on This->node is actually looped back into this object, so release it */
IXMLDOMNode_Release
(
This
->
node
);
This
->
node_unk
=
(
IUnknown
*
)
&
node
->
lpInternalUnkVtbl
;
This
->
node
=
IXMLDOMNode_from_impl
(
node
);
return
(
IUnknown
*
)
&
This
->
lpVtbl
;
}
...
...
dlls/msxml3/domdoc.c
View file @
d48246e1
...
...
@@ -2198,7 +2198,7 @@ static dispex_static_data_t domdoc_dispex = {
HRESULT
DOMDocument_create_from_xmldoc
(
xmlDocPtr
xmldoc
,
IXMLDOMDocument2
**
document
)
{
domdoc
*
doc
;
HRESULT
hr
;
xmlnode
*
node
;
doc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
doc
)
);
if
(
!
doc
)
...
...
@@ -2222,26 +2222,18 @@ HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument2 **docu
doc
->
safeopt
=
0
;
doc
->
bsc
=
NULL
;
doc
->
node_unk
=
create_basic_node
(
(
xmlNodePtr
)
xmldoc
,
(
IUnknown
*
)
&
doc
->
lpVtbl
);
if
(
!
doc
->
node_unk
)
node
=
create_basic_node
(
(
xmlNodePtr
)
xmldoc
,
(
IUnknown
*
)
&
doc
->
lpVtbl
);
if
(
!
node
)
{
HeapFree
(
GetProcessHeap
(),
0
,
doc
);
return
E_FAIL
;
}
hr
=
IUnknown_QueryInterface
(
doc
->
node_unk
,
&
IID_IXMLDOMNode
,
(
LPVOID
*
)
&
doc
->
node
);
if
(
FAILED
(
hr
))
{
IUnknown_Release
(
doc
->
node_unk
);
HeapFree
(
GetProcessHeap
(),
0
,
doc
);
return
E_FAIL
;
}
doc
->
node_unk
=
(
IUnknown
*
)
&
node
->
lpInternalUnkVtbl
;
doc
->
node
=
IXMLDOMNode_from_impl
(
node
);
init_dispex
(
&
doc
->
dispex
,
(
IUnknown
*
)
&
doc
->
lpVtbl
,
&
domdoc_dispex
);
/* The ref on doc->node is actually looped back into this object, so release it */
IXMLDOMNode_Release
(
doc
->
node
);
*
document
=
(
IXMLDOMDocument2
*
)
&
doc
->
lpVtbl
;
TRACE
(
"returning iface %p
\n
"
,
*
document
);
...
...
dlls/msxml3/element.c
View file @
d48246e1
...
...
@@ -790,7 +790,7 @@ static const struct IUnknownVtbl internal_unk_vtbl =
IUnknown
*
create_element
(
xmlNodePtr
element
,
IUnknown
*
pUnkOuter
)
{
domelem
*
This
;
HRESULT
hr
;
xmlnode
*
node
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
*
This
);
if
(
!
This
)
...
...
@@ -805,22 +805,15 @@ IUnknown* create_element( xmlNodePtr element, IUnknown *pUnkOuter )
else
This
->
pUnkOuter
=
(
IUnknown
*
)
&
This
->
lpInternalUnkVtbl
;
This
->
node_unk
=
create_basic_node
(
element
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
This
->
node_unk
)
node
=
create_basic_node
(
element
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
node
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
hr
=
IUnknown_QueryInterface
(
This
->
node_unk
,
&
IID_IXMLDOMNode
,
(
LPVOID
*
)
&
This
->
node
);
if
(
FAILED
(
hr
))
{
IUnknown_Release
(
This
->
node_unk
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
/* The ref on This->node is actually looped back into this object, so release it */
IXMLDOMNode_Release
(
This
->
node
);
This
->
node_unk
=
(
IUnknown
*
)
&
node
->
lpInternalUnkVtbl
;
This
->
node
=
IXMLDOMNode_from_impl
(
node
);
return
(
IUnknown
*
)
&
This
->
lpInternalUnkVtbl
;
}
...
...
dlls/msxml3/entityref.c
View file @
d48246e1
...
...
@@ -519,7 +519,7 @@ static const struct IXMLDOMEntityReferenceVtbl entityref_vtbl =
IUnknown
*
create_doc_entity_ref
(
xmlNodePtr
entity
)
{
entityref
*
This
;
HRESULT
hr
;
xmlnode
*
node
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
*
This
);
if
(
!
This
)
...
...
@@ -528,22 +528,15 @@ IUnknown* create_doc_entity_ref( xmlNodePtr entity )
This
->
lpVtbl
=
&
entityref_vtbl
;
This
->
ref
=
1
;
This
->
node_unk
=
create_basic_node
(
entity
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
This
->
node_unk
)
node
=
create_basic_node
(
entity
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
node
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
hr
=
IUnknown_QueryInterface
(
This
->
node_unk
,
&
IID_IXMLDOMNode
,
(
LPVOID
*
)
&
This
->
node
);
if
(
FAILED
(
hr
))
{
IUnknown_Release
(
This
->
node_unk
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
/* The ref on This->node is actually looped back into this object, so release it */
IXMLDOMNode_Release
(
This
->
node
);
This
->
node_unk
=
(
IUnknown
*
)
&
node
->
lpInternalUnkVtbl
;
This
->
node
=
IXMLDOMNode_from_impl
(
node
);
return
(
IUnknown
*
)
&
This
->
lpVtbl
;
}
...
...
dlls/msxml3/msxml_private.h
View file @
d48246e1
...
...
@@ -39,7 +39,6 @@
extern
IUnknown
*
create_domdoc
(
xmlNodePtr
document
);
extern
IUnknown
*
create_xmldoc
(
void
);
extern
IXMLDOMNode
*
create_node
(
xmlNodePtr
node
);
extern
IUnknown
*
create_basic_node
(
xmlNodePtr
node
,
IUnknown
*
pUnkOuter
);
extern
IUnknown
*
create_element
(
xmlNodePtr
element
,
IUnknown
*
pUnkOuter
);
extern
IUnknown
*
create_attribute
(
xmlNodePtr
attribute
);
extern
IUnknown
*
create_text
(
xmlNodePtr
text
);
...
...
@@ -84,6 +83,13 @@ static inline xmlnode *impl_from_IXMLDOMNode( IXMLDOMNode *iface )
return
(
xmlnode
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
xmlnode
,
lpVtbl
));
}
static
inline
IXMLDOMNode
*
IXMLDOMNode_from_impl
(
xmlnode
*
This
)
{
return
(
IXMLDOMNode
*
)
&
This
->
lpVtbl
;
}
extern
xmlnode
*
create_basic_node
(
xmlNodePtr
,
IUnknown
*
);
extern
HRESULT
DOMDocument_create_from_xmldoc
(
xmlDocPtr
xmldoc
,
IXMLDOMDocument2
**
document
);
static
inline
BSTR
bstr_from_xmlChar
(
const
xmlChar
*
str
)
...
...
dlls/msxml3/node.c
View file @
d48246e1
...
...
@@ -1542,7 +1542,7 @@ static const struct IUnknownVtbl internal_unk_vtbl =
Internal_Release
};
IUnknown
*
create_basic_node
(
xmlNodePtr
node
,
IUnknown
*
pUnkOuter
)
xmlnode
*
create_basic_node
(
xmlNodePtr
node
,
IUnknown
*
pUnkOuter
)
{
xmlnode
*
This
;
...
...
@@ -1564,7 +1564,7 @@ IUnknown *create_basic_node( xmlNodePtr node, IUnknown *pUnkOuter )
This
->
ref
=
1
;
This
->
node
=
node
;
return
(
IUnknown
*
)
&
This
->
lpInternalUnkVtbl
;
return
This
;
}
IXMLDOMNode
*
create_node
(
xmlNodePtr
node
)
...
...
@@ -1599,7 +1599,7 @@ IXMLDOMNode *create_node( xmlNodePtr node )
break
;
default:
FIXME
(
"only creating basic node for type %d
\n
"
,
node
->
type
);
pUnk
=
create_basic_node
(
node
,
NULL
)
;
pUnk
=
(
IUnknown
*
)
&
create_basic_node
(
node
,
NULL
)
->
lpInternalUnkVtbl
;
}
hr
=
IUnknown_QueryInterface
(
pUnk
,
&
IID_IXMLDOMNode
,
(
LPVOID
*
)
&
ret
);
...
...
dlls/msxml3/pi.c
View file @
d48246e1
...
...
@@ -605,7 +605,7 @@ static const struct IXMLDOMProcessingInstructionVtbl dom_pi_vtbl =
IUnknown
*
create_pi
(
xmlNodePtr
pi
)
{
dom_pi
*
This
;
HRESULT
hr
;
xmlnode
*
node
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
*
This
);
if
(
!
This
)
...
...
@@ -614,22 +614,15 @@ IUnknown* create_pi( xmlNodePtr pi )
This
->
lpVtbl
=
&
dom_pi_vtbl
;
This
->
ref
=
1
;
This
->
node_unk
=
create_basic_node
(
pi
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
This
->
node_unk
)
node
=
create_basic_node
(
pi
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
node
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
hr
=
IUnknown_QueryInterface
(
This
->
node_unk
,
&
IID_IXMLDOMNode
,
(
LPVOID
*
)
&
This
->
node
);
if
(
FAILED
(
hr
))
{
IUnknown_Release
(
This
->
node_unk
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
/* The ref on This->node is actually looped back into this object, so release it */
IXMLDOMNode_Release
(
This
->
node
);
This
->
node_unk
=
(
IUnknown
*
)
&
node
->
lpInternalUnkVtbl
;
This
->
node
=
IXMLDOMNode_from_impl
(
node
);
return
(
IUnknown
*
)
&
This
->
lpVtbl
;
}
...
...
dlls/msxml3/text.c
View file @
d48246e1
...
...
@@ -772,7 +772,7 @@ static const struct IXMLDOMTextVtbl domtext_vtbl =
IUnknown
*
create_text
(
xmlNodePtr
text
)
{
domtext
*
This
;
HRESULT
hr
;
xmlnode
*
node
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
*
This
);
if
(
!
This
)
...
...
@@ -781,22 +781,15 @@ IUnknown* create_text( xmlNodePtr text )
This
->
lpVtbl
=
&
domtext_vtbl
;
This
->
ref
=
1
;
This
->
node_unk
=
create_basic_node
(
text
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
This
->
node_unk
)
node
=
create_basic_node
(
text
,
(
IUnknown
*
)
&
This
->
lpVtbl
);
if
(
!
node
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
hr
=
IUnknown_QueryInterface
(
This
->
node_unk
,
&
IID_IXMLDOMNode
,
(
LPVOID
*
)
&
This
->
node
);
if
(
FAILED
(
hr
))
{
IUnknown_Release
(
This
->
node_unk
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
NULL
;
}
/* The ref on This->node is actually looped back into this object, so release it */
IXMLDOMNode_Release
(
This
->
node
);
This
->
node_unk
=
(
IUnknown
*
)
&
node
->
lpInternalUnkVtbl
;
This
->
node
=
IXMLDOMNode_from_impl
(
node
);
return
(
IUnknown
*
)
&
This
->
lpVtbl
;
}
...
...
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