qemu/qapi
Laszlo Ersek d957043412 OptsVisitor: introduce basic list modes
We're going to need more state while processing a list of repeated
options. This change eliminates "repeated_opts_first" and adds a new state
variable:

  list_mode       repeated_opts  repeated_opts_first
  --------------  -------------  -------------------
  LM_NONE         NULL           false
  LM_STARTED      non-NULL       true
  LM_IN_PROGRESS  non-NULL       false

Additionally, it is documented that lookup_scalar() and processed(), both
called by opts_type_XXX(), are invalid in LM_STARTED -- generated qapi
code calls opts_next_list() to allocate the very first link before trying
to parse a scalar into it. List mode restrictions are expressed in
positive / inclusive form.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-08-20 11:51:59 -04:00
..
Makefile.objs build: move base QAPI files to libqemuutil.a 2013-01-12 18:42:51 +01:00
opts-visitor.c OptsVisitor: introduce basic list modes 2013-08-20 11:51:59 -04:00
qapi-dealloc-visitor.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
qapi-visit-core.c qapi: make visit_type_size fallback to type_int 2013-07-29 19:33:33 -05:00
qmp-dispatch.c qapi: move include files to include/qobject/ 2012-12-19 08:31:31 +01:00
qmp-input-visitor.c qapi: Anonymous unions 2013-07-26 21:10:11 +02:00
qmp-output-visitor.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
qmp-registry.c qapi: Fix unchecked strdup() by converting to g_strdup() 2013-01-30 11:14:46 +01:00
string-input-visitor.c qapi: move include files to include/qobject/ 2012-12-19 08:31:31 +01:00
string-output-visitor.c qapi: move include files to include/qobject/ 2012-12-19 08:31:31 +01:00