[ros-diffs] [ekohl] 53187: [WIDL] - Reapply the switchtype patch from widl-ros.diff. This patch should be sent upstream to wine. See issue #6406 for more details.

ekohl at svn.reactos.org ekohl at svn.reactos.org
Thu Aug 11 18:34:27 UTC 2011


Author: ekohl
Date: Thu Aug 11 18:34:26 2011
New Revision: 53187

URL: http://svn.reactos.org/svn/reactos?rev=53187&view=rev
Log:
[WIDL]
- Reapply the switchtype patch from widl-ros.diff. This patch should be sent upstream to wine.

See issue #6406 for more details.

Modified:
    trunk/reactos/tools/widl/parser.tab.c
    trunk/reactos/tools/widl/parser.y

Modified: trunk/reactos/tools/widl/parser.tab.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/parser.tab.c?rev=53187&r1=53186&r2=53187&view=diff
==============================================================================
--- trunk/reactos/tools/widl/parser.tab.c [iso-8859-1] (original)
+++ trunk/reactos/tools/widl/parser.tab.c [iso-8859-1] Thu Aug 11 18:34:26 2011
@@ -6398,6 +6398,12 @@
   else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC))
     attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) );
 
+  /* Append the SWITCHTYPE attribute to a non-encapsulated union if it does not already have it.  */
+  if (type_get_type_detect_alias(type) == TYPE_UNION &&
+      is_attr(attrs, ATTR_SWITCHTYPE) &&
+      !is_attr(type->attrs, ATTR_SWITCHTYPE))
+    type->attrs = append_attr(type->attrs, make_attrp(ATTR_SWITCHTYPE, get_attrp(attrs, ATTR_SWITCHTYPE)));
+
   LIST_FOR_EACH_ENTRY( decl, decls, const declarator_t, entry )
   {
 

Modified: trunk/reactos/tools/widl/parser.y
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/parser.y?rev=53187&r1=53186&r2=53187&view=diff
==============================================================================
--- trunk/reactos/tools/widl/parser.y [iso-8859-1] (original)
+++ trunk/reactos/tools/widl/parser.y [iso-8859-1] Thu Aug 11 18:34:26 2011
@@ -1850,6 +1850,12 @@
   else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC))
     attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) );
 
+  /* Append the SWITCHTYPE attribute to a non-encapsulated union if it does not already have it.  */
+  if (type_get_type_detect_alias(type) == TYPE_UNION &&
+      is_attr(attrs, ATTR_SWITCHTYPE) &&
+      !is_attr(type->attrs, ATTR_SWITCHTYPE))
+    type->attrs = append_attr(type->attrs, make_attrp(ATTR_SWITCHTYPE, get_attrp(attrs, ATTR_SWITCHTYPE)));
+
   LIST_FOR_EACH_ENTRY( decl, decls, const declarator_t, entry )
   {
 




More information about the Ros-diffs mailing list