[5/8] widl: dereference operator in expr work on any declared pointer

Michael Karcher wine at mkarcher.dialup.fu-berlin.de
Sat Jan 10 15:37:38 CST 2009


If we take MIDL 6.00.0366 as reference, the following method type is
legal:

	void frobnicate([size_is(x),in,out] int * bar1,
                        [size_is(*bar1),out] int * bar2,
                        [in] int x);

Without this patch, size_is(*bar1) would be rejected.
---
 tools/widl/expr.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/widl/expr.c b/tools/widl/expr.c
index 7f0e26d..e943062 100644
--- a/tools/widl/expr.c
+++ b/tools/widl/expr.c
@@ -468,8 +468,8 @@ static struct expression_type resolve_expression(const struct expr_loc *expr_loc
         break;
     case EXPR_PPTR:
         result = resolve_expression(expr_loc, cont_type, e->ref);
-        if (result.type && is_ptr(result.type))
-            result.type = type_pointer_get_ref(result.type);
+        if (result.type && is_declptr(result.type))
+            result.type = get_deref_type(result.type);
         else
             error_loc_info(&expr_loc->v->loc_info, "dereference operator applied to non-pointer type in expression%s%s\n",
                            expr_loc->attr ? " for attribute " : "",
-- 
1.5.6.5





More information about the wine-devel mailing list