Module: wine Branch: master Commit: d8d963a9c3701a6a899f4f1f6fd2f8fe3fca63da URL: http://source.winehq.org/git/wine.git/?a=commit;h=d8d963a9c3701a6a899f4f1f6f...
Author: Huw Davies huw@codeweavers.com Date: Thu Feb 3 11:53:30 2011 +0000
widl: Don't dereference if the referenced type is a user type.
---
tools/widl/typegen.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 32a0b16..5702cbc 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -1520,8 +1520,12 @@ static unsigned int write_nonsimple_pointer(FILE *file, const attr_list_t *attrs if (out_attr && !in_attr && pointer_type == RPC_FC_RP) flags |= RPC_FC_P_ONSTACK;
- if (is_ptr(type) && is_declptr(type_pointer_get_ref(type))) - flags |= RPC_FC_P_DEREF; + if (is_ptr(type)) + { + type_t *ref = type_pointer_get_ref(type); + if(is_declptr(ref) && !is_user_type(ref)) + flags |= RPC_FC_P_DEREF; + }
print_file(file, 2, "0x%x, 0x%x,\t\t/* %s", pointer_type,