« Previous | Next » 

Revision d9570434

IDd95704341280fc521dc2b16bbbc5858f6647e2c3

Added by Laszlo Ersek over 10 years ago

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 <>
Tested-by: Wanlong Gao <>
Signed-off-by: Luiz Capitulino <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences