Rob Shearman : widl: Ignore pointer attributes applied to interface pointers.
Alexandre Julliard
julliard at winehq.org
Wed Feb 25 09:22:36 CST 2009
Module: wine
Branch: master
Commit: a93f531c210a77f6ca66b66cf0fed674adb74e7d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a93f531c210a77f6ca66b66cf0fed674adb74e7d
Author: Rob Shearman <robertshearman at gmail.com>
Date: Tue Feb 24 15:15:21 2009 +0000
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.
---
tools/widl/parser.y | 7 ++++++-
tools/widl/proxy.c | 1 -
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 9ac093d..0988efd 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -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)
{
diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c
index 0355eda..2999b3f 100644
--- a/tools/widl/proxy.c
+++ b/tools/widl/proxy.c
@@ -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:
More information about the wine-cvs
mailing list