Module: wine Branch: master Commit: ca22457d7bc88036029f03e70c0732a37e5759d1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ca22457d7bc88036029f03e70c...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Jul 27 16:16:08 2011 +0200
widl: Don't set base types to 0 on proxy entry.
---
tools/widl/proxy.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c index 5129971..699e073 100644 --- a/tools/widl/proxy.c +++ b/tools/widl/proxy.c @@ -111,12 +111,14 @@ static void clear_output_vars( const var_list_t *args ) if (!args) return; LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry ) { - if (is_attr(arg->attrs, ATTR_OUT) && !is_attr(arg->attrs, ATTR_IN)) { - print_proxy( "if(%s)\n", arg->name ); - indent++; - print_proxy( "MIDL_memset( %s, 0, sizeof( *%s ));\n", arg->name, arg->name ); - indent--; - } + if (is_attr(arg->attrs, ATTR_IN)) continue; + if (!is_attr(arg->attrs, ATTR_OUT)) continue; + if (is_ptr(arg->type)) + { + 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 ); } }