Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6a5dda71
Commit
6a5dda71
authored
Jan 26, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Remove superfluous pointer casts.
parent
bd9c265c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
43 additions
and
50 deletions
+43
-50
cdata.c
dlls/msxml3/cdata.c
+6
-6
comment.c
dlls/msxml3/comment.c
+2
-2
domdoc.c
dlls/msxml3/domdoc.c
+12
-12
node.c
dlls/msxml3/node.c
+3
-3
saxreader.c
dlls/msxml3/saxreader.c
+15
-22
saxreader.c
dlls/msxml3/tests/saxreader.c
+1
-1
text.c
dlls/msxml3/text.c
+2
-2
xmldoc.c
dlls/msxml3/xmldoc.c
+1
-1
xmlelem.c
dlls/msxml3/xmlelem.c
+1
-1
No files found.
dlls/msxml3/cdata.c
View file @
6a5dda71
...
...
@@ -520,7 +520,7 @@ static HRESULT WINAPI domcdata_get_length(
long
*
len
)
{
domcdata
*
This
=
impl_from_IXMLDOMCDATASection
(
iface
);
xmlnode
*
pDOMNode
=
impl_from_IXMLDOMNode
(
(
IXMLDOMNode
*
)
This
->
node
);
xmlnode
*
pDOMNode
=
impl_from_IXMLDOMNode
(
This
->
node
);
xmlChar
*
pContent
;
long
nLength
=
0
;
...
...
@@ -546,7 +546,7 @@ static HRESULT WINAPI domcdata_substringData(
long
offset
,
long
count
,
BSTR
*
p
)
{
domcdata
*
This
=
impl_from_IXMLDOMCDATASection
(
iface
);
xmlnode
*
pDOMNode
=
impl_from_IXMLDOMNode
(
(
IXMLDOMNode
*
)
This
->
node
);
xmlnode
*
pDOMNode
=
impl_from_IXMLDOMNode
(
This
->
node
);
xmlChar
*
pContent
;
long
nLength
=
0
;
HRESULT
hr
=
S_FALSE
;
...
...
@@ -591,7 +591,7 @@ static HRESULT WINAPI domcdata_appendData(
BSTR
p
)
{
domcdata
*
This
=
impl_from_IXMLDOMCDATASection
(
iface
);
xmlnode
*
pDOMNode
=
impl_from_IXMLDOMNode
(
(
IXMLDOMNode
*
)
This
->
node
);
xmlnode
*
pDOMNode
=
impl_from_IXMLDOMNode
(
This
->
node
);
xmlChar
*
pContent
;
HRESULT
hr
=
S_FALSE
;
...
...
@@ -601,7 +601,7 @@ static HRESULT WINAPI domcdata_appendData(
if
(
p
==
NULL
||
SysStringLen
(
p
)
==
0
)
return
S_OK
;
pContent
=
xmlChar_from_wchar
(
(
WCHAR
*
)
p
);
pContent
=
xmlChar_from_wchar
(
p
);
if
(
pContent
)
{
if
(
xmlTextConcat
(
pDOMNode
->
node
,
pContent
,
SysStringLen
(
p
)
)
==
0
)
...
...
@@ -621,7 +621,7 @@ static HRESULT WINAPI domcdata_insertData(
long
offset
,
BSTR
p
)
{
domcdata
*
This
=
impl_from_IXMLDOMCDATASection
(
iface
);
xmlnode
*
pDOMNode
=
impl_from_IXMLDOMNode
(
(
IXMLDOMNode
*
)
This
->
node
);
xmlnode
*
pDOMNode
=
impl_from_IXMLDOMNode
(
This
->
node
);
xmlChar
*
pXmlContent
;
BSTR
sNewString
;
HRESULT
hr
=
S_FALSE
;
...
...
@@ -667,7 +667,7 @@ static HRESULT WINAPI domcdata_insertData(
sNewString
[
nLengthP
+
nLength
]
=
0
;
str
=
xmlChar_from_wchar
(
(
WCHAR
*
)
sNewString
);
str
=
xmlChar_from_wchar
(
sNewString
);
if
(
str
)
{
xmlNodeSetContent
(
pDOMNode
->
node
,
str
);
...
...
dlls/msxml3/comment.c
View file @
6a5dda71
...
...
@@ -595,7 +595,7 @@ static HRESULT WINAPI domcomment_appendData(
if
(
p
==
NULL
||
SysStringLen
(
p
)
==
0
)
return
S_OK
;
pContent
=
xmlChar_from_wchar
(
(
WCHAR
*
)
p
);
pContent
=
xmlChar_from_wchar
(
p
);
if
(
pContent
)
{
/* Older versions of libxml < 2.6.27 didn't correctly support
...
...
@@ -675,7 +675,7 @@ static HRESULT WINAPI domcomment_insertData(
sNewString
[
nLengthP
+
nLength
]
=
0
;
str
=
xmlChar_from_wchar
(
(
WCHAR
*
)
sNewString
);
str
=
xmlChar_from_wchar
(
sNewString
);
if
(
str
)
{
xmlNodeSetContent
(
pDOMNode
->
node
,
str
);
...
...
dlls/msxml3/domdoc.c
View file @
6a5dda71
...
...
@@ -459,11 +459,11 @@ static HRESULT WINAPI domdoc_QueryInterface( IXMLDOMDocument2 *iface, REFIID rii
}
else
if
(
IsEqualGUID
(
&
IID_IPersistStream
,
riid
))
{
*
ppvObject
=
(
IPersistStream
*
)
&
(
This
->
lpvtblIPersistStream
);
*
ppvObject
=
&
(
This
->
lpvtblIPersistStream
);
}
else
if
(
IsEqualGUID
(
&
IID_IObjectWithSite
,
riid
))
{
*
ppvObject
=
(
IObjectWithSite
*
)
&
(
This
->
lpvtblIObjectWithSite
);
*
ppvObject
=
&
(
This
->
lpvtblIObjectWithSite
);
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_ISupportErrorInfo
))
{
...
...
@@ -1041,7 +1041,7 @@ static HRESULT WINAPI domdoc_createElement(
TRACE
(
"%p->(%s,%p)
\n
"
,
iface
,
debugstr_w
(
tagname
),
element
);
xml_name
=
xmlChar_from_wchar
(
(
WCHAR
*
)
tagname
);
xml_name
=
xmlChar_from_wchar
(
tagname
);
xmlnode
=
xmlNewDocNode
(
get_doc
(
This
),
NULL
,
xml_name
,
NULL
);
xmldoc_add_orphan
(
xmlnode
->
doc
,
xmlnode
);
...
...
@@ -1098,7 +1098,7 @@ static HRESULT WINAPI domdoc_createTextNode(
*
text
=
NULL
;
xml_content
=
xmlChar_from_wchar
(
(
WCHAR
*
)
data
);
xml_content
=
xmlChar_from_wchar
(
data
);
xmlnode
=
xmlNewText
(
xml_content
);
HeapFree
(
GetProcessHeap
(),
0
,
xml_content
);
...
...
@@ -1130,7 +1130,7 @@ static HRESULT WINAPI domdoc_createComment(
*
comment
=
NULL
;
xml_content
=
xmlChar_from_wchar
(
(
WCHAR
*
)
data
);
xml_content
=
xmlChar_from_wchar
(
data
);
xmlnode
=
xmlNewComment
(
xml_content
);
HeapFree
(
GetProcessHeap
(),
0
,
xml_content
);
...
...
@@ -1162,7 +1162,7 @@ static HRESULT WINAPI domdoc_createCDATASection(
*
cdata
=
NULL
;
xml_content
=
xmlChar_from_wchar
(
(
WCHAR
*
)
data
);
xml_content
=
xmlChar_from_wchar
(
data
);
xmlnode
=
xmlNewCDataBlock
(
get_doc
(
This
),
xml_content
,
strlen
(
(
char
*
)
xml_content
)
);
HeapFree
(
GetProcessHeap
(),
0
,
xml_content
);
...
...
@@ -1197,8 +1197,8 @@ static HRESULT WINAPI domdoc_createProcessingInstruction(
if
(
!
target
||
lstrlenW
(
target
)
==
0
)
return
E_FAIL
;
xml_target
=
xmlChar_from_wchar
(
(
WCHAR
*
)
target
);
xml_content
=
xmlChar_from_wchar
(
(
WCHAR
*
)
data
);
xml_target
=
xmlChar_from_wchar
(
target
);
xml_content
=
xmlChar_from_wchar
(
data
);
xmlnode
=
xmlNewDocPI
(
get_doc
(
This
),
xml_target
,
xml_content
);
xmldoc_add_orphan
(
xmlnode
->
doc
,
xmlnode
);
...
...
@@ -1232,7 +1232,7 @@ static HRESULT WINAPI domdoc_createAttribute(
*
attribute
=
NULL
;
xml_name
=
xmlChar_from_wchar
(
(
WCHAR
*
)
name
);
xml_name
=
xmlChar_from_wchar
(
name
);
xmlnode
=
(
xmlNode
*
)
xmlNewProp
(
NULL
,
xml_name
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
xml_name
);
...
...
@@ -1264,7 +1264,7 @@ static HRESULT WINAPI domdoc_createEntityReference(
*
entityRef
=
NULL
;
xml_name
=
xmlChar_from_wchar
(
(
WCHAR
*
)
name
);
xml_name
=
xmlChar_from_wchar
(
name
);
xmlnode
=
xmlNewReference
(
get_doc
(
This
),
xml_name
);
HeapFree
(
GetProcessHeap
(),
0
,
xml_name
);
...
...
@@ -1339,7 +1339,7 @@ static HRESULT WINAPI domdoc_createNode(
TRACE
(
"node_type %d
\n
"
,
node_type
);
xml_name
=
xmlChar_from_wchar
(
(
WCHAR
*
)
name
);
xml_name
=
xmlChar_from_wchar
(
name
);
switch
(
node_type
)
{
...
...
@@ -2279,7 +2279,7 @@ IUnknown* create_domdoc( xmlNodePtr document )
if
(
FAILED
(
hr
))
return
NULL
;
return
(
IUnknown
*
)
pObj
;
return
pObj
;
}
#else
...
...
dlls/msxml3/node.c
View file @
6a5dda71
...
...
@@ -345,7 +345,7 @@ static HRESULT WINAPI xmlnode_put_nodeValue(
case
XML_PI_NODE
:
case
XML_TEXT_NODE
:
{
str
=
xmlChar_from_wchar
(
(
WCHAR
*
)
V_BSTR
(
&
string_value
));
str
=
xmlChar_from_wchar
(
V_BSTR
(
&
string_value
));
xmlNodeSetContent
(
This
->
node
,
str
);
HeapFree
(
GetProcessHeap
(),
0
,
str
);
hr
=
S_OK
;
...
...
@@ -904,7 +904,7 @@ static HRESULT WINAPI xmlnode_put_text(
break
;
}
str
=
xmlChar_from_wchar
(
(
WCHAR
*
)
text
);
str
=
xmlChar_from_wchar
(
text
);
/* Escape the string. */
str2
=
xmlEncodeEntitiesReentrant
(
This
->
node
->
doc
,
str
);
...
...
@@ -1060,7 +1060,7 @@ static HRESULT WINAPI xmlnode_put_dataType(
{
xmlNsPtr
pNS
=
NULL
;
xmlAttrPtr
pAttr
=
NULL
;
xmlChar
*
str
=
xmlChar_from_wchar
(
(
WCHAR
*
)
dataTypeName
);
xmlChar
*
str
=
xmlChar_from_wchar
(
dataTypeName
);
pAttr
=
xmlHasNsProp
(
This
->
node
,
(
xmlChar
*
)
"dt"
,
(
xmlChar
*
)
"urn:schemas-microsoft-com:datatypes"
);
...
...
dlls/msxml3/saxreader.c
View file @
6a5dda71
...
...
@@ -457,9 +457,8 @@ static HRESULT WINAPI ivbsaxattributes_getIndexFromName(
{
saxattributes
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
ISAXAttributes_getIndexFromName
(
(
ISAXAttributes
*
)
&
This
->
lpSAXAttributesVtbl
,
(
const
WCHAR
*
)
uri
,
SysStringLen
(
uri
),
(
const
WCHAR
*
)
localName
,
SysStringLen
(
localName
),
index
);
(
ISAXAttributes
*
)
&
This
->
lpSAXAttributesVtbl
,
uri
,
SysStringLen
(
uri
),
localName
,
SysStringLen
(
localName
),
index
);
}
static
HRESULT
WINAPI
ivbsaxattributes_getIndexFromQName
(
...
...
@@ -469,8 +468,8 @@ static HRESULT WINAPI ivbsaxattributes_getIndexFromQName(
{
saxattributes
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
ISAXAttributes_getIndexFromQName
(
(
ISAXAttributes
*
)
&
This
->
lpSAXAttributesVtbl
,
(
const
WCHAR
*
)
QName
,
SysStringLen
(
QName
),
index
);
(
ISAXAttributes
*
)
&
This
->
lpSAXAttributesVtbl
,
QName
,
SysStringLen
(
QName
),
index
);
}
static
HRESULT
WINAPI
ivbsaxattributes_getType
(
...
...
@@ -494,10 +493,8 @@ static HRESULT WINAPI ivbsaxattributes_getTypeFromName(
int
len
;
saxattributes
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
ISAXAttributes_getTypeFromName
(
(
ISAXAttributes
*
)
&
This
->
lpSAXAttributesVtbl
,
(
const
WCHAR
*
)
uri
,
SysStringLen
(
uri
),
(
const
WCHAR
*
)
localName
,
SysStringLen
(
localName
),
(
const
WCHAR
**
)
type
,
&
len
);
(
ISAXAttributes
*
)
&
This
->
lpSAXAttributesVtbl
,
uri
,
SysStringLen
(
uri
),
localName
,
SysStringLen
(
localName
),
(
const
WCHAR
**
)
type
,
&
len
);
}
static
HRESULT
WINAPI
ivbsaxattributes_getTypeFromQName
(
...
...
@@ -508,9 +505,8 @@ static HRESULT WINAPI ivbsaxattributes_getTypeFromQName(
int
len
;
saxattributes
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
ISAXAttributes_getTypeFromQName
(
(
ISAXAttributes
*
)
&
This
->
lpSAXAttributesVtbl
,
(
const
WCHAR
*
)
QName
,
SysStringLen
(
QName
),
(
const
WCHAR
**
)
type
,
&
len
);
(
ISAXAttributes
*
)
&
This
->
lpSAXAttributesVtbl
,
QName
,
SysStringLen
(
QName
),
(
const
WCHAR
**
)
type
,
&
len
);
}
static
HRESULT
WINAPI
ivbsaxattributes_getValue
(
...
...
@@ -534,10 +530,8 @@ static HRESULT WINAPI ivbsaxattributes_getValueFromName(
int
len
;
saxattributes
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
ISAXAttributes_getValueFromName
(
(
ISAXAttributes
*
)
&
This
->
lpSAXAttributesVtbl
,
(
const
WCHAR
*
)
uri
,
SysStringLen
(
uri
),
(
const
WCHAR
*
)
localName
,
SysStringLen
(
localName
),
(
const
WCHAR
**
)
value
,
&
len
);
(
ISAXAttributes
*
)
&
This
->
lpSAXAttributesVtbl
,
uri
,
SysStringLen
(
uri
),
localName
,
SysStringLen
(
localName
),
(
const
WCHAR
**
)
value
,
&
len
);
}
static
HRESULT
WINAPI
ivbsaxattributes_getValueFromQName
(
...
...
@@ -548,9 +542,8 @@ static HRESULT WINAPI ivbsaxattributes_getValueFromQName(
int
len
;
saxattributes
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
ISAXAttributes_getValueFromQName
(
(
ISAXAttributes
*
)
&
This
->
lpSAXAttributesVtbl
,
(
const
WCHAR
*
)
QName
,
SysStringLen
(
QName
),
(
const
WCHAR
**
)
value
,
&
len
);
(
ISAXAttributes
*
)
&
This
->
lpSAXAttributesVtbl
,
QName
,
SysStringLen
(
QName
),
(
const
WCHAR
**
)
value
,
&
len
);
}
static
const
struct
IVBSAXAttributesVtbl
ivbsaxattributes_vtbl
=
...
...
@@ -1329,7 +1322,7 @@ static void libxmlFatalError(void *ctx, const char *msg, ...)
len
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
message
,
-
1
,
NULL
,
0
);
wszError
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
len
);
if
(
wszError
)
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
message
,
-
1
,
(
LPWSTR
)
wszError
,
len
);
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
message
,
-
1
,
wszError
,
len
);
if
(
This
->
vbInterface
)
{
...
...
@@ -2031,7 +2024,7 @@ static HRESULT internal_parse(
hr
=
SafeArrayGetUBound
(
V_ARRAY
(
&
varInput
),
1
,
&
uBound
);
if
(
hr
!=
S_OK
)
break
;
dataRead
=
(
uBound
-
lBound
)
*
SafeArrayGetElemsize
(
V_ARRAY
(
&
varInput
));
hr
=
SafeArrayAccessData
(
V_ARRAY
(
&
varInput
),
(
void
**
)
&
pSAData
);
hr
=
SafeArrayAccessData
(
V_ARRAY
(
&
varInput
),
&
pSAData
);
if
(
hr
!=
S_OK
)
break
;
hr
=
internal_parseBuffer
(
This
,
pSAData
,
dataRead
,
vbInterface
);
SafeArrayUnaccessData
(
V_ARRAY
(
&
varInput
));
...
...
@@ -2267,7 +2260,7 @@ static HRESULT WINAPI saxxmlreader_QueryInterface(IVBSAXXMLReader* iface, REFIID
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_ISAXXMLReader
))
{
*
ppvObject
=
(
ISAXXMLReader
*
)
&
This
->
lpSAXXMLReaderVtbl
;
*
ppvObject
=
&
This
->
lpSAXXMLReaderVtbl
;
}
else
{
...
...
dlls/msxml3/tests/saxreader.c
View file @
6a5dda71
...
...
@@ -546,7 +546,7 @@ static void test_saxreader(void)
CreateStreamOnHGlobal
(
NULL
,
TRUE
,
&
iStream
);
liSize
.
QuadPart
=
strlen
(
szTestXML
);
IStream_SetSize
(
iStream
,
liSize
);
IStream_Write
(
iStream
,
(
void
const
*
)
szTestXML
,
strlen
(
szTestXML
),
&
bytesWritten
);
IStream_Write
(
iStream
,
szTestXML
,
strlen
(
szTestXML
),
&
bytesWritten
);
liPos
.
QuadPart
=
0
;
IStream_Seek
(
iStream
,
liPos
,
STREAM_SEEK_SET
,
NULL
);
V_VT
(
&
var
)
=
VT_UNKNOWN
|
VT_DISPATCH
;
...
...
dlls/msxml3/text.c
View file @
6a5dda71
...
...
@@ -603,7 +603,7 @@ static HRESULT WINAPI domtext_appendData(
if
(
p
==
NULL
||
SysStringLen
(
p
)
==
0
)
return
S_OK
;
pContent
=
xmlChar_from_wchar
(
(
WCHAR
*
)
p
);
pContent
=
xmlChar_from_wchar
(
p
);
if
(
pContent
)
{
if
(
xmlTextConcat
(
pDOMNode
->
node
,
pContent
,
SysStringLen
(
p
)
)
==
0
)
...
...
@@ -669,7 +669,7 @@ static HRESULT WINAPI domtext_insertData(
sNewString
[
nLengthP
+
nLength
]
=
0
;
str
=
xmlChar_from_wchar
(
(
WCHAR
*
)
sNewString
);
str
=
xmlChar_from_wchar
(
sNewString
);
if
(
str
)
{
xmlNodeSetContent
(
pDOMNode
->
node
,
str
);
...
...
dlls/msxml3/xmldoc.c
View file @
6a5dda71
...
...
@@ -86,7 +86,7 @@ static HRESULT WINAPI xmldoc_QueryInterface(IXMLDocument *iface, REFIID riid, vo
else
if
(
IsEqualGUID
(
&
IID_IPersistStreamInit
,
riid
)
||
IsEqualGUID
(
&
IID_IPersistStream
,
riid
))
{
*
ppvObject
=
(
IPersistStreamInit
*
)
&
(
This
->
lpvtblIPersistStreamInit
);
*
ppvObject
=
&
(
This
->
lpvtblIPersistStreamInit
);
}
else
{
...
...
dlls/msxml3/xmlelem.c
View file @
6a5dda71
...
...
@@ -516,7 +516,7 @@ static HRESULT WINAPI xmlelem_collection_QueryInterface(IXMLElementCollection *i
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IEnumVARIANT
))
{
*
ppvObject
=
(
IEnumVARIANT
*
)
&
(
This
->
lpvtblIEnumVARIANT
);
*
ppvObject
=
&
(
This
->
lpvtblIEnumVARIANT
);
}
else
{
...
...
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