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
83e91274
Commit
83e91274
authored
Sep 30, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Get rid of node internal IUnknown.
parent
4ca6e39f
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
48 additions
and
76 deletions
+48
-76
attribute.c
dlls/msxml3/attribute.c
+1
-1
cdata.c
dlls/msxml3/cdata.c
+1
-1
comment.c
dlls/msxml3/comment.c
+1
-1
docfrag.c
dlls/msxml3/docfrag.c
+1
-1
domdoc.c
dlls/msxml3/domdoc.c
+1
-1
element.c
dlls/msxml3/element.c
+1
-1
entityref.c
dlls/msxml3/entityref.c
+1
-1
msxml_private.h
dlls/msxml3/msxml_private.h
+1
-1
node.c
dlls/msxml3/node.c
+38
-66
pi.c
dlls/msxml3/pi.c
+1
-1
text.c
dlls/msxml3/text.c
+1
-1
No files found.
dlls/msxml3/attribute.c
View file @
83e91274
...
...
@@ -93,7 +93,7 @@ static ULONG WINAPI domattr_Release(
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
{
IXMLDOMNode_Release
(
IXMLDOMNode_from_impl
(
This
->
node
)
);
destroy_xmlnode
(
This
->
node
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
dlls/msxml3/cdata.c
View file @
83e91274
...
...
@@ -100,7 +100,7 @@ static ULONG WINAPI domcdata_Release(
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
{
IXMLDOMNode_Release
(
IXMLDOMNode_from_impl
(
This
->
node
)
);
destroy_xmlnode
(
This
->
node
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
dlls/msxml3/comment.c
View file @
83e91274
...
...
@@ -94,7 +94,7 @@ static ULONG WINAPI domcomment_Release(
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
{
IXMLDOMNode_Release
(
IXMLDOMNode_from_impl
(
This
->
node
)
);
destroy_xmlnode
(
This
->
node
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
dlls/msxml3/docfrag.c
View file @
83e91274
...
...
@@ -93,7 +93,7 @@ static ULONG WINAPI domfrag_Release(
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
{
IXMLDOMNode_Release
(
IXMLDOMNode_from_impl
(
This
->
node
)
);
destroy_xmlnode
(
This
->
node
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
dlls/msxml3/domdoc.c
View file @
83e91274
...
...
@@ -509,7 +509,7 @@ static ULONG WINAPI domdoc_Release(
if
(
This
->
site
)
IUnknown_Release
(
This
->
site
);
IXMLDOMNode_Release
(
IXMLDOMNode_from_impl
(
This
->
node
)
);
destroy_xmlnode
(
This
->
node
);
if
(
This
->
schema
)
IXMLDOMSchemaCollection_Release
(
This
->
schema
);
if
(
This
->
stream
)
IStream_Release
(
This
->
stream
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
dlls/msxml3/element.c
View file @
83e91274
...
...
@@ -108,7 +108,7 @@ static ULONG WINAPI domelem_Release(
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
IXMLDOMNode_Release
(
IXMLDOMNode_from_impl
(
This
->
node
)
);
destroy_xmlnode
(
This
->
node
);
heap_free
(
This
);
}
...
...
dlls/msxml3/entityref.c
View file @
83e91274
...
...
@@ -93,7 +93,7 @@ static ULONG WINAPI entityref_Release(
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
{
IXMLDOMNode_Release
(
IXMLDOMNode_from_impl
(
This
->
node
)
);
destroy_xmlnode
(
This
->
node
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
dlls/msxml3/msxml_private.h
View file @
83e91274
...
...
@@ -144,7 +144,6 @@ typedef struct _xmlnode
{
DispatchEx
dispex
;
const
struct
IXMLDOMNodeVtbl
*
lpVtbl
;
const
struct
IUnknownVtbl
*
lpInternalUnkVtbl
;
IUnknown
*
pUnkOuter
;
LONG
ref
;
xmlNodePtr
node
;
...
...
@@ -161,6 +160,7 @@ static inline IXMLDOMNode *IXMLDOMNode_from_impl(xmlnode *This)
}
extern
xmlnode
*
create_basic_node
(
xmlNodePtr
,
IUnknown
*
,
dispex_static_data_t
*
);
extern
void
destroy_xmlnode
(
xmlnode
*
);
extern
HRESULT
DOMDocument_create_from_xmldoc
(
xmlDocPtr
xmldoc
,
IXMLDOMDocument2
**
document
);
...
...
dlls/msxml3/node.c
View file @
83e91274
...
...
@@ -66,11 +66,6 @@ static const WCHAR szFloat[] = {'f','l','o','a','t',0};
static
const
WCHAR
szUUID
[]
=
{
'u'
,
'u'
,
'i'
,
'd'
,
0
};
static
const
WCHAR
szBinHex
[]
=
{
'b'
,
'i'
,
'n'
,
'.'
,
'h'
,
'e'
,
'x'
,
0
};
static
inline
xmlnode
*
impl_from_InternalUnknown
(
IUnknown
*
iface
)
{
return
(
xmlnode
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
xmlnode
,
lpInternalUnkVtbl
));
}
xmlNodePtr
xmlNodePtr_from_domnode
(
IXMLDOMNode
*
iface
,
xmlElementType
type
)
{
xmlnode
*
This
;
...
...
@@ -91,23 +86,52 @@ static HRESULT WINAPI xmlnode_QueryInterface(
void
**
ppvObject
)
{
xmlnode
*
This
=
impl_from_IXMLDOMNode
(
iface
);
TRACE
(
"%p %s %p
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObject
);
return
IUnknown_QueryInterface
(
This
->
pUnkOuter
,
riid
,
ppvObject
);
if
(
This
->
pUnkOuter
)
return
IUnknown_QueryInterface
(
This
->
pUnkOuter
,
riid
,
ppvObject
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
*
ppvObject
=
iface
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IDispatch
)
||
IsEqualGUID
(
riid
,
&
IID_IXMLDOMNode
))
{
*
ppvObject
=
&
This
->
lpVtbl
;
}
else
{
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
));
*
ppvObject
=
NULL
;
return
E_NOINTERFACE
;
}
IUnknown_AddRef
(
(
IUnknown
*
)
*
ppvObject
);
return
S_OK
;
}
static
ULONG
WINAPI
xmlnode_AddRef
(
IXMLDOMNode
*
iface
)
{
xmlnode
*
This
=
impl_from_IXMLDOMNode
(
iface
);
return
IUnknown_AddRef
(
This
->
pUnkOuter
);
if
(
This
->
pUnkOuter
)
return
IUnknown_AddRef
(
This
->
pUnkOuter
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
xmlnode_Release
(
IXMLDOMNode
*
iface
)
{
xmlnode
*
This
=
impl_from_IXMLDOMNode
(
iface
);
return
IUnknown_Release
(
This
->
pUnkOuter
);
LONG
ref
;
if
(
This
->
pUnkOuter
)
return
IUnknown_Release
(
This
->
pUnkOuter
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
!
ref
)
destroy_xmlnode
(
This
);
return
ref
;
}
static
HRESULT
WINAPI
xmlnode_GetTypeInfoCount
(
...
...
@@ -1484,64 +1508,13 @@ static const struct IXMLDOMNodeVtbl xmlnode_vtbl =
xmlnode_transformNodeToObject
,
};
static
HRESULT
WINAPI
Internal_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
void
destroy_xmlnode
(
xmlnode
*
This
)
{
xmlnode
*
This
=
impl_from_InternalUnknown
(
iface
);
TRACE
(
"%p %s %p
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppvObject
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
*
ppvObject
=
iface
;
else
if
(
IsEqualGUID
(
riid
,
&
IID_IDispatch
)
||
IsEqualGUID
(
riid
,
&
IID_IXMLDOMNode
)
)
*
ppvObject
=
&
This
->
lpVtbl
;
else
{
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
));
*
ppvObject
=
NULL
;
return
E_NOINTERFACE
;
}
IUnknown_AddRef
(
(
IUnknown
*
)
*
ppvObject
);
return
S_OK
;
}
static
ULONG
WINAPI
Internal_AddRef
(
IUnknown
*
iface
)
{
xmlnode
*
This
=
impl_from_InternalUnknown
(
iface
);
return
InterlockedIncrement
(
&
This
->
ref
);
if
(
This
->
node
)
xmldoc_release
(
This
->
node
->
doc
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
static
ULONG
WINAPI
Internal_Release
(
IUnknown
*
iface
)
{
xmlnode
*
This
=
impl_from_InternalUnknown
(
iface
);
ULONG
ref
;
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
{
if
(
This
->
node
)
xmldoc_release
(
This
->
node
->
doc
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
static
const
struct
IUnknownVtbl
internal_unk_vtbl
=
{
Internal_QueryInterface
,
Internal_AddRef
,
Internal_Release
};
xmlnode
*
create_basic_node
(
xmlNodePtr
node
,
IUnknown
*
pUnkOuter
,
dispex_static_data_t
*
dispex_data
)
{
xmlnode
*
This
;
...
...
@@ -1554,12 +1527,11 @@ xmlnode *create_basic_node( xmlNodePtr node, IUnknown *pUnkOuter, dispex_static_
xmldoc_add_ref
(
node
->
doc
);
This
->
lpVtbl
=
&
xmlnode_vtbl
;
This
->
lpInternalUnkVtbl
=
&
internal_unk_vtbl
;
if
(
pUnkOuter
)
This
->
pUnkOuter
=
pUnkOuter
;
/* Don't take a ref on outer Unknown */
else
This
->
pUnkOuter
=
(
IUnknown
*
)
&
This
->
lpInternalUnkVtbl
;
This
->
pUnkOuter
=
NULL
;
if
(
dispex_data
)
init_dispex
(
&
This
->
dispex
,
This
->
pUnkOuter
,
dispex_data
);
...
...
@@ -1602,7 +1574,7 @@ IXMLDOMNode *create_node( xmlNodePtr node )
break
;
default:
FIXME
(
"only creating basic node for type %d
\n
"
,
node
->
type
);
pUnk
=
(
IUnknown
*
)
&
create_basic_node
(
node
,
NULL
,
NULL
)
->
lp
InternalUnk
Vtbl
;
pUnk
=
(
IUnknown
*
)
&
create_basic_node
(
node
,
NULL
,
NULL
)
->
lpVtbl
;
}
hr
=
IUnknown_QueryInterface
(
pUnk
,
&
IID_IXMLDOMNode
,
(
LPVOID
*
)
&
ret
);
...
...
dlls/msxml3/pi.c
View file @
83e91274
...
...
@@ -93,7 +93,7 @@ static ULONG WINAPI dom_pi_Release(
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
{
IXMLDOMNode_Release
(
IXMLDOMNode_from_impl
(
This
->
node
)
);
destroy_xmlnode
(
This
->
node
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
dlls/msxml3/text.c
View file @
83e91274
...
...
@@ -102,7 +102,7 @@ static ULONG WINAPI domtext_Release(
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
{
IXMLDOMNode_Release
(
IXMLDOMNode_from_impl
(
This
->
node
)
);
destroy_xmlnode
(
This
->
node
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
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