From 599818849ac4cf1075ff4c07a1557a693fef27d4 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Thu, 4 Dec 2008 20:20:08 +0000 Subject: [PATCH] Sync to wine-1.1.3: - Dan Hipschman Thu, 7 Aug 2008 widl: Honor typedef pointer attributes. svn path=/trunk/; revision=37860 --- reactos/media/doc/README.WINE | 2 +- reactos/tools/widl/parser.tab.c | 7 ++++--- reactos/tools/widl/parser.y | 7 ++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 6db6f972fa3..8256e734c9e 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -26,7 +26,7 @@ reactos/tools/wpp # Synced to Wine-20081105 (~Wine-1.1.7) reactos/tools/winebuild # Synced to Wine-20081105 (~Wine-1.1.7) reactos/tools/wmc # Synced to Wine-20081105 (~Wine-1.1.7) reactos/tools/wrc # Synced to Wine-20081105 (~Wine-1.1.7) -reactos/tools/widl # Synced to Wine-1_1_1 omitting patches that break MIDL-Compatibility +reactos/tools/widl # Synced to Wine-1_1_3, omitting patches that break MIDL-Compatibility The following libraries are shared with Wine. diff --git a/reactos/tools/widl/parser.tab.c b/reactos/tools/widl/parser.tab.c index 6f5c3032e94..25a3f18895b 100644 --- a/reactos/tools/widl/parser.tab.c +++ b/reactos/tools/widl/parser.tab.c @@ -4741,7 +4741,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; @@ -4772,13 +4771,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; diff --git a/reactos/tools/widl/parser.y b/reactos/tools/widl/parser.y index d044c07c5f4..0694090aa15 100644 --- a/reactos/tools/widl/parser.y +++ b/reactos/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; -- 2.17.1