widl: Don't set base types to 0 on proxy entry.

This commit is contained in:
Alexandre Julliard 2011-07-27 16:16:08 +02:00
parent 0d76bb7ec3
commit ca22457d7b

View File

@ -111,12 +111,14 @@ static void clear_output_vars( const var_list_t *args )
if (!args) return; if (!args) return;
LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry ) LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry )
{ {
if (is_attr(arg->attrs, ATTR_OUT) && !is_attr(arg->attrs, ATTR_IN)) { if (is_attr(arg->attrs, ATTR_IN)) continue;
print_proxy( "if(%s)\n", arg->name ); if (!is_attr(arg->attrs, ATTR_OUT)) continue;
indent++; if (is_ptr(arg->type))
print_proxy( "MIDL_memset( %s, 0, sizeof( *%s ));\n", arg->name, arg->name ); {
indent--; if (type_get_type(type_pointer_get_ref(arg->type)) == TYPE_BASIC) continue;
} if (type_get_type(type_pointer_get_ref(arg->type)) == TYPE_ENUM) continue;
}
print_proxy( "if (%s) MIDL_memset( %s, 0, sizeof( *%s ));\n", arg->name, arg->name, arg->name );
} }
} }