Module: wine Branch: master Commit: a333c6584d73f76f227dff905f807491188e91cd URL: http://source.winehq.org/git/wine.git/?a=commit;h=a333c6584d73f76f227dff905f...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Wed Apr 2 18:37:47 2014 +0900
widl: Add support for an array of strings to write_string_tfs.
---
tools/widl/typegen.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 9d9aeb7..d85b5e0 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -85,6 +85,8 @@ static const unsigned short IsSimpleRef = 0x0100; static unsigned int field_memsize(const type_t *type, unsigned int *offset); static unsigned int fields_memsize(const var_list_t *fields, unsigned int *align); static unsigned int type_memsize_and_alignment(const type_t *t, unsigned int *align); +static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t *type, + const char *name, unsigned int *typestring_offset); static unsigned int write_struct_tfs(FILE *file, type_t *type, const char *name, unsigned int *tfsoff); static int write_embedded_types(FILE *file, const attr_list_t *attrs, type_t *type, const char *name, int write_ptr, unsigned int *tfsoff); @@ -2809,6 +2811,9 @@ static unsigned int write_string_tfs(FILE *file, const attr_list_t *attrs, else elem_type = type_pointer_get_ref(type);
+ if (type_get_type(elem_type) == TYPE_POINTER && is_array(type)) + return write_array_tfs(file, attrs, type, name, typestring_offset); + if (type_get_type(elem_type) != TYPE_BASIC) { error("write_string_tfs: Unimplemented for non-basic type %s\n", name);