qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 01/15] qapi: add code generator for qmp-types (v


From: Anthony Liguori
Subject: [Qemu-devel] Re: [PATCH 01/15] qapi: add code generator for qmp-types (v2)
Date: Fri, 11 Mar 2011 17:12:03 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8

On 03/11/2011 05:05 PM, Anthony Liguori wrote:
Only generate qmp-types.[ch].  These files contain the type definitions for
QMP along with the alloc/free functions for these types.  Functions to convert
enum values to integers and vice versa are also included.

qmp-types is used both within QEMU and within libqmp

Special alloc/free functions are provided to ensure that all structures are
padded when allocated.  This makes sure that libqmp can provide a forward
compatible interface since all additions to a structure will have a boolean
enable flag.

The free function is convenient since individual structures may have pointers
that also require freeing.

Signed-off-by: Anthony Liguori<address@hidden>
---
v1 ->  v2
  - modify code generator to use multiline strings instead of prints
  - support proxy commands
  - support async commands

As a friendly hint for reviewers, qmp-gen.py reads a lot better with syntax highlighting as the Python code stands out from the C code. I've pushed these patches to:

http://repo.or.cz/w/qemu/aliguori.git qapi/round.1-v2

If you'd prefer to clone that and look at the code in a git tree.

This new series generates the same code as the last series (minus a little whitespace differences) so you can refer to the previous series to see the code output.+def qmp_event_func_to_c(name):
Regards,

Anthony Liguori



reply via email to

[Prev in Thread] Current Thread [Next in Thread]