webservices: Add support for optional values in WsReadType.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Hans Leidekker 2016-03-30 14:12:14 +02:00 committed by Alexandre Julliard
parent c1ea9df0a0
commit f162da498f
3 changed files with 592 additions and 275 deletions

File diff suppressed because it is too large Load Diff

View File

@ -32,6 +32,7 @@ WS_XML_STRING *alloc_xml_string( const unsigned char *, ULONG ) DECLSPEC_HIDDEN;
WS_XML_UTF8_TEXT *alloc_utf8_text( const unsigned char *, ULONG ) DECLSPEC_HIDDEN;
HRESULT append_attribute( WS_XML_ELEMENT_NODE *, WS_XML_ATTRIBUTE * ) DECLSPEC_HIDDEN;
void free_attribute( WS_XML_ATTRIBUTE * ) DECLSPEC_HIDDEN;
ULONG get_field_size( const WS_STRUCT_DESCRIPTION *, ULONG ) DECLSPEC_HIDDEN;
struct node
{

View File

@ -1378,7 +1378,7 @@ static HRESULT write_type_struct_field( struct writer *writer, const WS_FIELD_DE
return S_OK;
}
static ULONG get_field_size( const WS_STRUCT_DESCRIPTION *desc, ULONG index )
ULONG get_field_size( const WS_STRUCT_DESCRIPTION *desc, ULONG index )
{
if (index < desc->fieldCount - 1) return desc->fields[index + 1]->offset - desc->fields[index]->offset;
return desc->size - desc->fields[index]->offset;