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.
This commit is contained in:
Rob Shearman 2009-01-02 12:14:50 +00:00 committed by Alexandre Julliard
parent ba34921034
commit 10a422ae14
1 changed files with 3 additions and 3 deletions

View File

@ -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)