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
befbc8f5
Commit
befbc8f5
authored
Nov 18, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite: Implement GetNodeType() for reader.
parent
d6937901
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
reader.c
dlls/xmllite/reader.c
+6
-2
reader.c
dlls/xmllite/tests/reader.c
+12
-0
No files found.
dlls/xmllite/reader.c
View file @
befbc8f5
...
...
@@ -87,6 +87,7 @@ typedef struct _xmlreader
xmlreaderinput
*
input
;
IMalloc
*
imalloc
;
XmlReadState
state
;
XmlNodeType
nodetype
;
DtdProcessing
dtdmode
;
UINT
line
,
pos
;
/* reader position in XML stream */
}
xmlreader
;
...
...
@@ -469,8 +470,10 @@ static HRESULT WINAPI xmlreader_Read(IXmlReader* iface, XmlNodeType *node_type)
static
HRESULT
WINAPI
xmlreader_GetNodeType
(
IXmlReader
*
iface
,
XmlNodeType
*
node_type
)
{
FIXME
(
"(%p %p): stub
\n
"
,
iface
,
node_type
);
return
E_NOTIMPL
;
xmlreader
*
This
=
impl_from_IXmlReader
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
node_type
);
*
node_type
=
This
->
nodetype
;
return
This
->
state
==
XmlReadState_Closed
?
S_FALSE
:
S_OK
;
}
static
HRESULT
WINAPI
xmlreader_MoveToFirstAttribute
(
IXmlReader
*
iface
)
...
...
@@ -725,6 +728,7 @@ HRESULT WINAPI CreateXmlReader(REFIID riid, void **obj, IMalloc *imalloc)
reader
->
line
=
reader
->
pos
=
0
;
reader
->
imalloc
=
imalloc
;
if
(
imalloc
)
IMalloc_AddRef
(
imalloc
);
reader
->
nodetype
=
XmlNodeType_None
;
*
obj
=
&
reader
->
IXmlReader_iface
;
...
...
dlls/xmllite/tests/reader.c
View file @
befbc8f5
...
...
@@ -351,6 +351,7 @@ static void test_reader_create(void)
IXmlReader
*
reader
;
IUnknown
*
input
;
DtdProcessing
dtd
;
XmlNodeType
nodetype
;
/* crashes native */
if
(
0
)
...
...
@@ -364,6 +365,11 @@ static void test_reader_create(void)
test_read_state
(
reader
,
XmlReadState_Closed
,
-
1
,
FALSE
);
nodetype
=
XmlNodeType_Element
;
hr
=
IXmlReader_GetNodeType
(
reader
,
&
nodetype
);
ok
(
hr
==
S_FALSE
,
"got %08x
\n
"
,
hr
);
ok
(
nodetype
==
XmlNodeType_None
,
"got %d
\n
"
,
nodetype
);
dtd
=
2
;
hr
=
IXmlReader_GetProperty
(
reader
,
XmlReaderProperty_DtdProcessing
,
(
LONG_PTR
*
)
&
dtd
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
...
...
@@ -403,6 +409,7 @@ static void test_readerinput(void)
IXmlReader
*
reader
,
*
reader2
;
IUnknown
*
obj
,
*
input
;
IStream
*
stream
,
*
stream2
;
XmlNodeType
nodetype
;
HRESULT
hr
;
LONG
ref
;
...
...
@@ -444,6 +451,11 @@ static void test_readerinput(void)
test_read_state
(
reader
,
XmlReadState_Initial
,
-
1
,
FALSE
);
nodetype
=
XmlNodeType_Element
;
hr
=
IXmlReader_GetNodeType
(
reader
,
&
nodetype
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
nodetype
==
XmlNodeType_None
,
"got %d
\n
"
,
nodetype
);
/* IXmlReader grabs a IXmlReaderInput reference */
ref
=
IUnknown_AddRef
(
reader_input
);
ok
(
ref
==
3
,
"Expected 3, got %d
\n
"
,
ref
);
...
...
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