widl: Initialise ref pointers to basic and enum types to 0 in generated server code.
Previously it was only done for pointers.
This commit is contained in:
parent
48a5db074b
commit
d38cc9acbc
|
@ -3822,8 +3822,25 @@ void assign_stub_out_args( FILE *file, int indent, const var_t *func, const char
|
|||
else
|
||||
{
|
||||
fprintf(file, " = &%s_W%u;\n", local_var_prefix, i);
|
||||
if (is_ptr(var->type) && !last_ptr(var->type))
|
||||
switch (typegen_detect_type(type_pointer_get_ref(var->type), var->attrs, TDT_IGNORE_STRINGS))
|
||||
{
|
||||
case TGT_BASIC:
|
||||
case TGT_ENUM:
|
||||
case TGT_POINTER:
|
||||
print_file(file, indent, "%s_W%u = 0;\n", local_var_prefix, i);
|
||||
break;
|
||||
case TGT_STRUCT:
|
||||
case TGT_UNION:
|
||||
case TGT_USER_TYPE:
|
||||
case TGT_IFACE_POINTER:
|
||||
case TGT_ARRAY:
|
||||
case TGT_CTXT_HANDLE:
|
||||
case TGT_CTXT_HANDLE_POINTER:
|
||||
case TGT_INVALID:
|
||||
case TGT_STRING:
|
||||
/* not initialised */
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue