[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 13/22] qapi: add code generators for QMP command
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 13/22] qapi: add code generators for QMP command marshaling |
Date: |
Mon, 7 Mar 2011 14:38:33 +0000 |
On Mon, Mar 7, 2011 at 1:44 PM, Anthony Liguori <address@hidden> wrote:
> On 03/07/2011 07:27 AM, Stefan Hajnoczi wrote:
>>
>> On Mon, Mar 7, 2011 at 1:22 AM, Anthony Liguori<address@hidden>
>> 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.
There's a really simple one built into Python:
http://docs.python.org/release/2.5.4/lib/node40.html
Stefan
- [Qemu-devel] [PATCH 10/22] qapi: add core QMP server support, (continued)
[Qemu-devel] [PATCH 12/22] qapi: add QAPI module type, Anthony Liguori, 2011/03/06
[Qemu-devel] [PATCH 06/22] qapi: add JSON parsing error message, Anthony Liguori, 2011/03/06
[Qemu-devel] [PATCH 13/22] qapi: add code generators for QMP command marshaling, Anthony Liguori, 2011/03/06
[Qemu-devel] [PATCH 15/22] qapi: add new QMP server that uses CharDriverState, Anthony Liguori, 2011/03/06
[Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command, Anthony Liguori, 2011/03/06
- Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command, Stefan Hajnoczi, 2011/03/07
- Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command, Anthony Liguori, 2011/03/07
- Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command, Avi Kivity, 2011/03/09
- Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command, Anthony Liguori, 2011/03/09
- Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command, Avi Kivity, 2011/03/09
- Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command, Anthony Liguori, 2011/03/09