[PATCH v2 1/5] widl: Use IsSimpleRef only for explicitly declared arrays.
Zebediah Figura
z.figura12 at gmail.com
Wed May 29 00:24:05 CDT 2019
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47285
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
tools/widl/typegen.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index e5fb20c55fb..91377123180 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -1064,9 +1064,16 @@ static unsigned char get_parameter_fc( const var_t *var, int is_return, unsigned
case TGT_UNION:
case TGT_USER_TYPE:
case TGT_RANGE:
+ *flags |= MustFree;
+ if (!is_in && is_out) server_size = type_memsize( ref );
+ break;
case TGT_ARRAY:
- *flags |= IsSimpleRef | MustFree;
- *typestring_offset = ref->typestring_offset;
+ *flags |= MustFree;
+ if (!type_array_is_decl_as_ptr(ref))
+ {
+ *flags |= IsSimpleRef;
+ *typestring_offset = ref->typestring_offset;
+ }
if (!is_in && is_out) server_size = type_memsize( ref );
break;
case TGT_STRING:
--
2.21.0
More information about the wine-devel
mailing list