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<aligu...@us.ibm.com>
---
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