From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33290 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pwak1-0006ju-GJ for qemu-devel@nongnu.org; Mon, 07 Mar 2011 08:44:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pwajt-0000hs-Py for qemu-devel@nongnu.org; Mon, 07 Mar 2011 08:44:53 -0500 Received: from mail-yi0-f45.google.com ([209.85.218.45]:38491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pwajt-0000hm-NY for qemu-devel@nongnu.org; Mon, 07 Mar 2011 08:44:45 -0500 Received: by yib19 with SMTP id 19so2018273yib.4 for ; Mon, 07 Mar 2011 05:44:45 -0800 (PST) Message-ID: <4D74E14C.1040805@codemonkey.ws> Date: Mon, 07 Mar 2011 07:44:44 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 13/22] qapi: add code generators for QMP command marshaling References: <1299460984-15849-1-git-send-email-aliguori@us.ibm.com> <1299460984-15849-14-git-send-email-aliguori@us.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, Adam Litke , Markus Armbruster , Luiz Capitulino On 03/07/2011 07:27 AM, Stefan Hajnoczi wrote: > On Mon, Mar 7, 2011 at 1:22 AM, Anthony Liguori wrote: > >> +def print_definition(name, required, optional, retval): >> > This function is pretty long. Is there a logical way to split it up > into several smaller meaningful functions? > It seems long because of the code generation but there's really not an awful lot of logic in it. It might be worth spending a little time looking at a template system. I'm not terribly familiar with any of the popular ones and I think they usually focus on HTML generation but it might help readability. Regards, Anthony Liguori > Stefan > >