Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47285 Signed-off-by: Zebediah Figura z.figura12@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:
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47285 Signed-off-by: Zebediah Figura z.figura12@gmail.com --- tools/widl/typegen.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 91377123180..c710df17914 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -2132,6 +2132,7 @@ static unsigned int write_nonsimple_pointer(FILE *file, const attr_list_t *attrs case TGT_POINTER: case TGT_CTXT_HANDLE: case TGT_CTXT_HANDLE_POINTER: + case TGT_ARRAY: flags |= FC_ALLOCED_ON_STACK; break; case TGT_IFACE_POINTER:
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- tools/widl/typegen.c | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index c710df17914..2c70d15710d 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -2951,15 +2951,11 @@ static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t unsigned int size; unsigned int start_offset; unsigned char fc; - int pointer_type = get_attrv(attrs, ATTR_POINTERTYPE); unsigned int baseoff = !type_array_is_decl_as_ptr(type) && current_structure ? type_memsize(current_structure) : 0;
- if (!pointer_type) - pointer_type = FC_RP; - if (!is_string_type(attrs, type_array_get_element(type))) write_embedded_types(file, attrs, type_array_get_element(type), name, FALSE, typestring_offset);
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47285 Signed-off-by: Zebediah Figura z.figura12@gmail.com --- tools/widl/typegen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 2c70d15710d..d47bee76167 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -3607,8 +3607,7 @@ static unsigned int write_type_tfs(FILE *file, int indent, context != TYPE_CONTEXT_CONTAINER_NO_POINTERS) { int ptr_type; - ptr_type = get_pointer_fc(type, attrs, - context == TYPE_CONTEXT_TOPLEVELPARAM); + ptr_type = get_pointer_fc_context(type, attrs, context); if (ptr_type != FC_RP || type_array_is_decl_as_ptr(type)) { unsigned int absoff = type->typestring_offset;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- tools/widl/parser.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index dd676e9a280..5d910852d10 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -1632,7 +1632,7 @@ static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, const decl else *ptype = type_new_array((*ptype)->name, type_array_get_element(*ptype), FALSE, - 0, dim, NULL, 0); + 0, dim, NULL, FC_RP); } else if (is_ptr(*ptype)) *ptype = type_new_array((*ptype)->name, type_pointer_get_ref(*ptype), TRUE,