Module: wine Branch: master Commit: 10a422ae1455574fd21f92135a2b5c2a9a287664 URL: http://source.winehq.org/git/wine.git/?a=commit;h=10a422ae1455574fd21f92135a...
Author: Rob Shearman robertshearman@gmail.com Date: Fri Jan 2 12:14:50 2009 +0000
widl: Use is_string_type instead of is_attr(..., ATTR_STRING) for detecting strings.
Detecting strings is a bit harder than just looking for the string attribute, so make sure to use the function which has the purpose of doing just that.
Fixes compilation of generated server/proxy code when a parameter has both the [out] and [string] attributes.
---
tools/widl/typegen.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 8852ca0..7810f80 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -2025,7 +2025,7 @@ static size_t write_struct_tfs(FILE *file, type_t *type, array = find_array_or_string_in_struct(type); if (array && !processed(array->type)) array_offset - = is_attr(array->attrs, ATTR_STRING) + = is_string_type(array->attrs, array->type) ? write_string_tfs(file, array->attrs, array->type, array->name, tfsoff) : write_array_tfs(file, array->attrs, array->type, array->name, tfsoff);
@@ -3291,7 +3291,7 @@ void declare_stub_args( FILE *file, int indent, const func_t *func )
LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) { - int is_string = is_attr(var->attrs, ATTR_STRING); + int is_string = is_string_type(var->attrs, var->type);
in_attr = is_attr(var->attrs, ATTR_IN); out_attr = is_attr(var->attrs, ATTR_OUT); @@ -3338,7 +3338,7 @@ void assign_stub_out_args( FILE *file, int indent, const func_t *func, const cha
LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) { - int is_string = is_attr(var->attrs, ATTR_STRING); + int is_string = is_string_type(var->attrs, var->type); in_attr = is_attr(var->attrs, ATTR_IN); out_attr = is_attr(var->attrs, ATTR_OUT); if (!out_attr && !in_attr)