diff mbox

[RFC,v5,09/32] Revert "qapi: Split up some typedefs to ease review"

Message ID 1441621003-2434-10-git-send-email-armbru@redhat.com
State New
Headers show

Commit Message

Markus Armbruster Sept. 7, 2015, 10:16 a.m. UTC
This reverts commit 6542034f356ebc6f2818c1c6b8c9a143f817bb2a.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 scripts/qapi-types.py | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

Comments

Eric Blake Sept. 8, 2015, 12:26 p.m. UTC | #1
On 09/07/2015 04:16 AM, Markus Armbruster wrote:
> This reverts commit 6542034f356ebc6f2818c1c6b8c9a143f817bb2a.

Of course, this commit id doesn't match the one that is currently on
your qapi-introspect branch. But it doesn't matter, either :)
Markus Armbruster Sept. 8, 2015, 12:58 p.m. UTC | #2
Eric Blake <eblake@redhat.com> writes:

> On 09/07/2015 04:16 AM, Markus Armbruster wrote:
>> This reverts commit 6542034f356ebc6f2818c1c6b8c9a143f817bb2a.
>
> Of course, this commit id doesn't match the one that is currently on
> your qapi-introspect branch. But it doesn't matter, either :)

I forgot to fix them up, but as you say, it doesn't really matter.
diff mbox

Patch

diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
index 124a788..d162ca2 100644
--- a/scripts/qapi-types.py
+++ b/scripts/qapi-types.py
@@ -15,15 +15,13 @@  from qapi import *
 def generate_fwd_builtin(name):
     return mcgen('''
 
-typedef struct %(name)sList %(name)sList;
-
-struct %(name)sList {
+typedef struct %(name)sList {
     union {
         %(type)s value;
         uint64_t padding;
     };
     struct %(name)sList *next;
-};
+} %(name)sList;
 ''',
                  type=c_type(name),
                  name=name)
@@ -33,30 +31,26 @@  def generate_fwd_struct(name):
 
 typedef struct %(name)s %(name)s;
 
-typedef struct %(name)sList %(name)sList;
-
-struct %(name)sList {
+typedef struct %(name)sList {
     union {
         %(name)s *value;
         uint64_t padding;
     };
     struct %(name)sList *next;
-};
+} %(name)sList;
 ''',
                  name=c_name(name))
 
 def generate_fwd_enum_struct(name):
     return mcgen('''
 
-typedef struct %(name)sList %(name)sList;
-
-struct %(name)sList {
+typedef struct %(name)sList {
     union {
         %(name)s value;
         uint64_t padding;
     };
     struct %(name)sList *next;
-};
+} %(name)sList;
 ''',
                  name=c_name(name))