Dan Hipschman : widl: Honor typedef pointer attributes.
Alexandre Julliard
julliard at winehq.org
Mon Aug 18 10:46:08 CDT 2008
Module: wine
Branch: master
Commit: 790e6dcd297717a7db160c68f3077c2a8a4c9718
URL: http://source.winehq.org/git/wine.git/?a=commit;h=790e6dcd297717a7db160c68f3077c2a8a4c9718
Author: Dan Hipschman <dsh at linux.ucla.edu>
Date: Thu Aug 7 10:33:46 2008 -0700
widl: Honor typedef pointer attributes.
---
tools/widl/parser.y | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index f1a95d4..f6daa0e 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -1426,7 +1426,6 @@ static void set_type(var_t *v, decl_spec_t *decl_spec, const declarator_t *decl,
{
expr_list_t *sizes = get_attrp(v->attrs, ATTR_SIZEIS);
expr_list_t *lengs = get_attrp(v->attrs, ATTR_LENGTHIS);
- int ptr_attr = get_attrv(v->attrs, ATTR_POINTERTYPE);
int sizeless, has_varconf;
expr_t *dim;
type_t *atype, **ptype;
@@ -1457,13 +1456,15 @@ static void set_type(var_t *v, decl_spec_t *decl_spec, const declarator_t *decl,
* pointer_default so we need to fix that up here */
if (!arr)
{
+ int ptr_attr = get_attrv(v->attrs, ATTR_POINTERTYPE);
const type_t *ptr = NULL;
/* pointer attributes on the left side of the type belong to the function
* pointer, if one is being declared */
type_t **pt = func_type ? &func_type : &v->type;
- for (ptr = *pt; ptr; )
+ for (ptr = *pt; ptr && !ptr_attr; )
{
- if (ptr->kind == TKIND_ALIAS)
+ ptr_attr = get_attrv(ptr->attrs, ATTR_POINTERTYPE);
+ if (!ptr_attr && ptr->kind == TKIND_ALIAS)
ptr = ptr->orig;
else
break;
More information about the wine-cvs
mailing list