[ros-diffs] [cwittich] 38609: -Rob Shearman <robertshearman at gmail.com> Thu Sep 18 2008 widl: Don't automatically add DUMMYUNIONNAME and DUMMYSTRUCTNAME names to anonymous unions and structs. -Rob Shearman <robertshearman at gmail.com> Thu Sep 18 2008 include: Add explicit DUMMYUNIONNAME and DUMMYSTRUCTNAME names to anonymous unions in IDL files.

cwittich at svn.reactos.org cwittich at svn.reactos.org
Tue Jan 6 18:52:25 CET 2009


Author: cwittich
Date: Tue Jan  6 11:52:24 2009
New Revision: 38609

URL: http://svn.reactos.org/svn/reactos?rev=38609&view=rev
Log:
-Rob Shearman <robertshearman at gmail.com> Thu Sep 18 2008
widl: Don't automatically add DUMMYUNIONNAME and DUMMYSTRUCTNAME names to anonymous unions and structs.

-Rob Shearman <robertshearman at gmail.com> Thu Sep 18 2008
include: Add explicit DUMMYUNIONNAME and DUMMYSTRUCTNAME names to anonymous unions in IDL files.

Modified:
    trunk/reactos/include/psdk/oaidl.idl
    trunk/reactos/include/psdk/objidl.idl
    trunk/reactos/include/psdk/propidl.idl
    trunk/reactos/include/reactos/idl/svcctl.idl
    trunk/reactos/tools/widl/header.c

Modified: trunk/reactos/include/psdk/oaidl.idl
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/oaidl.idl?rev=38609&r1=38608&r2=38609&view=diff
==============================================================================
--- trunk/reactos/include/psdk/oaidl.idl [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/oaidl.idl [iso-8859-1] Tue Jan  6 11:52:24 2009
@@ -286,7 +286,7 @@
   [case(VT_DISPATCH|VT_BYREF)] IDispatch **ppdispVal;
   [case(VT_ARRAY|VT_BYREF)]    wireSAFEARRAY *pparray;
   [case(VT_RECORD, VT_RECORD|VT_BYREF)] wireBRECORD brecVal;
-  };
+  } DUMMYUNIONNAME;
 };
 
 /* Dispatch */
@@ -313,7 +313,7 @@
   [case(VT_CARRAY)]            struct tagARRAYDESC *lpadesc;
   [case(VT_USERDEFINED)]       HREFTYPE hreftype;
   [default]                    ;
-  };
+  } DUMMYUNIONNAME;
   VARTYPE vt;
 } TYPEDESC;
 
@@ -484,7 +484,7 @@
   [switch_is(varkind)] union {
   [case(VAR_PERINSTANCE, VAR_DISPATCH, VAR_STATIC)] ULONG oInst;
   [case(VAR_CONST)] VARIANT *lpvarValue;
-  };
+  } DUMMYUNIONNAME;
   ELEMDESC elemdescVar;
   WORD wVarFlags;
   VARKIND varkind;

Modified: trunk/reactos/include/psdk/objidl.idl
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/objidl.idl?rev=38609&r1=38608&r2=38609&view=diff
==============================================================================
--- trunk/reactos/include/psdk/objidl.idl [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/objidl.idl [iso-8859-1] Tue Jan  6 11:52:24 2009
@@ -1378,7 +1378,6 @@
     [size_is(cbData)] byte data[];
   } RemSTGMEDIUM;
 
-  /* FIXME: C/C++ nameless union version */
   typedef struct tagSTGMEDIUM {
     DWORD tymed;
     [switch_is(tymed)] union {
@@ -1390,7 +1389,7 @@
     [case(TYMED_ISTREAM)]  IStream *pstm;
     [case(TYMED_ISTORAGE)] IStorage *pstg;
     [default]              ;
-    };
+    } DUMMYUNIONNAME;
     [unique] IUnknown *pUnkForRelease;
   } uSTGMEDIUM;
 
@@ -1425,7 +1424,7 @@
     case TYMED_FILE:     LPOLESTR lpszFileName;
     case TYMED_ISTREAM:  BYTE_BLOB *pstm;
     case TYMED_ISTORAGE: BYTE_BLOB *pstg;
-    };
+    } DUMMYUNIONNAME;
     IUnknown *pUnkForRelease;
   } userSTGMEDIUM;
 

Modified: trunk/reactos/include/psdk/propidl.idl
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/propidl.idl?rev=38609&r1=38608&r2=38609&view=diff
==============================================================================
--- trunk/reactos/include/psdk/propidl.idl [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/propidl.idl [iso-8859-1] Tue Jan  6 11:52:24 2009
@@ -201,7 +201,7 @@
     [case(VT_BYREF|VT_DISPATCH)]          IDispatch **ppdispVal;
     [case(VT_BYREF|VT_ARRAY)]             LPSAFEARRAY *pparray;
     [case(VT_BYREF|VT_VARIANT)]           PROPVARIANT *pvarVal;
-    };
+    } DUMMYUNIONNAME;
   };
 
   typedef struct tagPROPVARIANT *LPPROPVARIANT;
@@ -255,7 +255,7 @@
     [case(PRSPEC_PROPID)] PROPID propid;
     [case(PRSPEC_LPWSTR)] LPOLESTR lpwstr;
     [default]             ;
-    };
+    } DUMMYUNIONNAME;
   } PROPSPEC;
 
   typedef struct tagSTATPROPSTG {

Modified: trunk/reactos/include/reactos/idl/svcctl.idl
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/svcctl.idl?rev=38609&r1=38608&r2=38609&view=diff
==============================================================================
--- trunk/reactos/include/reactos/idl/svcctl.idl [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/idl/svcctl.idl [iso-8859-1] Tue Jan  6 11:52:24 2009
@@ -188,7 +188,7 @@
         [case(5)] LPSERVICE_SID_INFO pssid;
         [case(6)] LPSERVICE_RPC_REQUIRED_PRIVILEGES_INFO psrp;
         [case(7)] LPSERVICE_PRESHUTDOWN_INFO psps;
-    };
+    } DUMMYUNIONNAME;
 } SC_RPC_CONFIG_INFOA, *LPSC_RPC_CONFIG_INFOA;
 
 typedef struct _SC_RPC_CONFIG_INFOW {
@@ -201,7 +201,7 @@
         [case(5)] LPSERVICE_SID_INFO pssid;
         [case(6)] LPSERVICE_RPC_REQUIRED_PRIVILEGES_INFO psrp;
         [case(7)] LPSERVICE_PRESHUTDOWN_INFO psps;
-    };
+    } DUMMYUNIONNAME;
 } SC_RPC_CONFIG_INFOW, *LPSC_RPC_CONFIG_INFOW;
 
 typedef struct _SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 {

Modified: trunk/reactos/tools/widl/header.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/header.c?rev=38609&r1=38608&r2=38609&view=diff
==============================================================================
--- trunk/reactos/tools/widl/header.c [iso-8859-1] (original)
+++ trunk/reactos/tools/widl/header.c [iso-8859-1] Tue Jan  6 11:52:24 2009
@@ -150,28 +150,8 @@
 {
   if (!v) return;
   if (v->type) {
-    const char *name = v->name;
-    if (name == NULL) {
-      switch (v->type->type) {
-      case RPC_FC_STRUCT:
-      case RPC_FC_CVSTRUCT:
-      case RPC_FC_CPSTRUCT:
-      case RPC_FC_CSTRUCT:
-      case RPC_FC_PSTRUCT:
-      case RPC_FC_BOGUS_STRUCT:
-      case RPC_FC_ENCAPSULATED_UNION:
-        name = "DUMMYSTRUCTNAME";
-        break;
-      case RPC_FC_NON_ENCAPSULATED_UNION:
-        name = "DUMMYUNIONNAME";
-        break;
-      default:
-        /* ? */
-        break;
-      }
-    }
     indent(h, 0);
-    write_type_def_or_decl(h, v->type, TRUE, "%s", name);
+    write_type_def_or_decl(h, v->type, TRUE, "%s", v->name);
     fprintf(h, ";\n");
   }
 }



More information about the Ros-diffs mailing list