r8932: Handle non-anonymous unions and structures better.
authorTim Potter <tpot@samba.org>
Tue, 2 Aug 2005 18:29:51 +0000 (18:29 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:30:58 +0000 (13:30 -0500)
(This used to be commit 04f993721574b4532962b5845faa4cb40a90ca38)

source4/build/pidl/smb_interfaces.yp

index bfb5dc7ed74dab1324a80d5cea07282333dc6cc2..f8c34eacdcb61653438d65e876ff0377b7846b67 100644 (file)
@@ -24,9 +24,9 @@ definition:
 
 struct: STRUCT optional_identifier '{' elements '}' pointers optional_identifiers ';'
        {
-               my $name = defined($_[2]) ? $_[2] : $_[7];
                {
-                       "NAME" => $name,
+                       "NAME" => $_[7],
+                       "STRUCT_NAME" => $_[2],
                        "TYPE" => "struct",
                        "DATA" => $_[4],
                }
@@ -36,9 +36,9 @@ struct: STRUCT optional_identifier '{' elements '}' pointers optional_identifier
 union:
        UNION optional_identifier '{' elements '}' pointers optional_identifier ';'
        {
-               my $name = defined($_[2]) ? $_[2] : $_[7];
                {
-                       "NAME" => $name,
+                       "NAME" => $_[7],
+                       "UNION_NAME" => $_[2],
                        "TYPE" => "union",
                        "DATA" => $_[4],
                }