widl: Remove duplicate pointer handling code in get_struct_type.

Only make the structure complex if there is an interface pointer, not
if there is a pointer to a union or complex struct since these are
handled perfectly well by the pointer marshalling code.

Fix the detection of structures with ref-pointers or pointers in 64-bit code.
This commit is contained in:
Rob Shearman 2008-12-30 18:49:48 +00:00 committed by Alexandre Julliard
parent c6e7609b01
commit 36c03f6a94
1 changed files with 4 additions and 19 deletions

View File

@ -142,25 +142,6 @@ static int get_struct_type(const type_t *type)
if (is_user_type(t))
return RPC_FC_BOGUS_STRUCT;
if (is_ptr(t))
{
do
t = t->ref;
while (is_ptr(t));
switch (get_struct_type(t))
{
case RPC_FC_IP:
case RPC_FC_ENCAPSULATED_UNION:
case RPC_FC_NON_ENCAPSULATED_UNION:
case RPC_FC_BOGUS_STRUCT:
return RPC_FC_BOGUS_STRUCT;
}
has_pointer = 1;
continue;
}
if (field->type->declarray)
{
if (is_string_type(field->attrs, field->type))
@ -222,6 +203,10 @@ static int get_struct_type(const type_t *type)
case RPC_FC_OP:
if (pointer_size != 4)
return RPC_FC_BOGUS_STRUCT;
/* pointers to interfaces aren't really pointers and have to be
* marshalled specially so they make the structure complex */
if (t->ref->type == RPC_FC_IP)
return RPC_FC_BOGUS_STRUCT;
has_pointer = 1;
break;