widl: Add a new function, type_pointer_get_ref.
Use it for retrieving the type that a pointer refers to.
diff --git a/tools/widl/expr.c b/tools/widl/expr.c
index 2fd4fa6..7f0e26d 100644
--- a/tools/widl/expr.c
+++ b/tools/widl/expr.c
@@ -469,7 +469,7 @@
case EXPR_PPTR:
result = resolve_expression(expr_loc, cont_type, e->ref);
if (result.type && is_ptr(result.type))
- result.type = result.type->ref;
+ result.type = type_pointer_get_ref(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 " : "",