From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UV2JL-0000Hv-CP for qemu-devel@nongnu.org; Wed, 24 Apr 2013 12:12:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UV2JK-0002S4-0p for qemu-devel@nongnu.org; Wed, 24 Apr 2013 12:12:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UV2JJ-0002Rp-Kr for qemu-devel@nongnu.org; Wed, 24 Apr 2013 12:12:45 -0400 Message-ID: <5178044B.5020708@redhat.com> Date: Wed, 24 Apr 2013 18:11:55 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20130419052612.GA10011@t430s.nay.redhat.com> <1366819685-24106-1-git-send-email-akong@redhat.com> In-Reply-To: <1366819685-24106-1-git-send-email-akong@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] qapi: add struct strList and visit_type_strList() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: vilanova@ac.upc.edu, stefanha@gmail.com, aliguori@us.ibm.com, mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org Il 24/04/2013 18:08, Amos Kong ha scritto: > diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py > index 9e19920..e449a14 100644 > --- a/scripts/qapi-types.py > +++ b/scripts/qapi-types.py > @@ -276,6 +276,7 @@ fdecl.write(mcgen(''' > #include > #include > > +struct strList; > ''', > guard=guardname(h_file))) > > diff --git a/scripts/qapi.py b/scripts/qapi.py > index afc5f32..14f9f4d 100644 > --- a/scripts/qapi.py > +++ b/scripts/qapi.py > @@ -166,11 +166,11 @@ def c_fun(name, protect=True): > return c_var(name, protect).replace('.', '_') > > def c_list_type(name): > - return '%sList' % name > + return 'struct %sList' % name > > def type_name(name): > if type(name) == list: > - return c_list_type(name[0]) > + return '%sList' % name[0] > return name This second change is needed to generate the correct function names, right? If so, Reviewed-by: Paolo Bonzini Paolo