widl: Ignore pointer attributes applied to interface pointers.

Print a warning if a pointer attribute is specified since the
generated code won't do what the developer expects.
This commit is contained in:
Rob Shearman 2009-02-24 15:15:21 +00:00 committed by Alexandre Julliard
parent cee15b2449
commit a93f531c21
2 changed files with 6 additions and 2 deletions

View File

@ -1446,7 +1446,12 @@ static void set_type(var_t *v, decl_spec_t *decl_spec, const declarator_t *decl,
}
if (ptr && is_ptr(ptr) && (ptr_attr || top))
{
if (!ptr_attr)
if (ptr_attr && ptr_attr != RPC_FC_UP &&
type_get_type(type_pointer_get_ref(ptr)) == TYPE_INTERFACE)
warning_loc_info(&v->loc_info,
"%s: pointer attribute applied to interface "
"pointer type has no effect\n", v->name);
if (top)
ptr_attr = RPC_FC_RP;
if (ptr_attr != (*pt)->type)
{

View File

@ -158,7 +158,6 @@ int cant_be_null(const var_t *v)
case TGT_ARRAY:
/* FIXME: work out pointer type */
return 0;
case TGT_IFACE_POINTER: /* FIXME */
case TGT_POINTER:
return (get_pointer_fc(v->type) == RPC_FC_RP);
case TGT_CTXT_HANDLE_POINTER: