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
e87c64f6
Commit
e87c64f6
authored
Aug 25, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Allow structures to be passed by value in WsWriteType.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
06fb21c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
writer.c
dlls/webservices/tests/writer.c
+15
-0
writer.c
dlls/webservices/writer.c
+1
-3
No files found.
dlls/webservices/tests/writer.c
View file @
e87c64f6
...
...
@@ -791,6 +791,21 @@ static void test_simple_struct_type(void)
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
check_output
(
writer
,
"<struct>value</struct>"
,
__LINE__
);
/* required value */
hr
=
set_output
(
writer
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsWriteStartElement
(
writer
,
NULL
,
&
localname
,
&
ns
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsWriteType
(
writer
,
WS_ELEMENT_CONTENT_TYPE_MAPPING
,
WS_STRUCT_TYPE
,
&
s
,
WS_WRITE_REQUIRED_VALUE
,
test
,
sizeof
(
*
test
),
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsWriteEndElement
(
writer
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
check_output
(
writer
,
"<struct>value</struct>"
,
__LINE__
);
hr
=
set_output
(
writer
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
...
...
dlls/webservices/writer.c
View file @
e87c64f6
...
...
@@ -1695,9 +1695,7 @@ static HRESULT write_type( struct writer *writer, WS_TYPE_MAPPING mapping, WS_TY
case
WS_STRUCT_TYPE
:
{
const
void
*
ptr
;
if
(
!
desc
||
option
==
WS_WRITE_REQUIRED_VALUE
)
return
E_INVALIDARG
;
if
(
!
desc
)
return
E_INVALIDARG
;
if
(
!
option
)
option
=
WS_WRITE_REQUIRED_POINTER
;
if
((
hr
=
get_value_ptr
(
option
,
value
,
size
,
(
const
void
**
)
&
ptr
))
!=
S_OK
)
return
hr
;
return
write_type_struct
(
writer
,
mapping
,
desc
,
ptr
);
...
...
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