summaryrefslogtreecommitdiff
path: root/scripts/qapi.py
AgeCommit message (Collapse)AuthorFilesLines
2012-09-26qapi: add "unix" to the set of reserved wordsPaolo Bonzini1-1/+3
It is #defined to 1. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-09-26qapi: do not protect enum values from namespace pollutionPaolo Bonzini1-4/+4
Enum values are always preceded by the uppercase name of the enum, so they do not conflict with reserved words. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-08-09qapi: avoid reserved keywordsBlue Swirl1-0/+16
Clang compiler complained about use of reserved word 'restrict' in SLIRP and QAPI. Prefix C keywords with "q_", adjust SLIRP accordingly. Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-01qapi: qapi.py: allow the "'" character to be escapedLuiz Capitulino1-10/+21
Support escaping the escape character, and make more robust (don't die for '', handle ' without matching '. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-07-23qapi: introduce "size" typeLaszlo Ersek1-0/+2
v1->v2: - fall back to uint64 rather than int Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-07-23qapi: generate C types for fixed-width integersLaszlo Ersek1-0/+4
(Long line folded using parens: <http://www.python.org/dev/peps/pep-0008/#maximum-line-length>.) Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-03-26qapi: add c_fun to escape function namesFederico Simoncelli1-1/+4
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-30qapi: fix guardname generationMichael Roth1-3/+4
Fix a bug in handling dotted paths, and exclude directory prefixes from generated guardnames to avoid odd/pseudo-random guardnames in generated headers. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-10-04qapi: add code generation support for middle modeAnthony Liguori1-1/+3
To get the ball rolling merging QAPI, this patch introduces a "middle mode" to the code generator. In middle mode, the code generator generates marshalling functions that are compatible with the current QMP server. We absolutely need to replace the current QMP server in order to support proper asynchronous commands but using a middle mode provides a middle-ground that lets us start converting commands in tree. Note that all of the commands have been converted already in my glib branch. Middle mode only exists until we finish merging them from my branch into the main tree. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-07-21qapi: add qapi.py helper librariesMichael Roth1-0/+203
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>