Skip to content
  • Laszlo Ersek's avatar
    d8754f40
    OptsVisitor: introduce list modes for interval flattening · d8754f40
    Laszlo Ersek authored
    
    
    The new modes are equal-rank, exclusive alternatives of LM_IN_PROGRESS.
    Teach opts_next_list(), opts_type_int() and opts_type_uint64() to handle
    them.
    
    Also enumerate explicitly what functions are valid to call in what modes:
    - opts_next_list() is valid to call while flattening a range,
    - opts_end_list(): ditto,
    - lookup_scalar() is invalid to call during flattening; generated qapi
      traversal code must continue asking for the same kind of signed/unsigned
      list element until the interval is fully flattened,
    - processed(): ditto.
    
    List mode restrictions are always formulated in positive / inclusive
    sense. The restrictions for lookup_scalar() and processed() are
    automatically satisfied by current qapi traversals if the schema to build
    is compatible with OptsVisitor.
    
    The new list modes are not entered yet.
    
    Signed-off-by: default avatarLaszlo Ersek <lersek@redhat.com>
    Tested-by: default avatarWanlong Gao <gaowanlong@cn.fujitsu.com>
    Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
    d8754f40
    OptsVisitor: introduce list modes for interval flattening
    Laszlo Ersek authored
    
    
    The new modes are equal-rank, exclusive alternatives of LM_IN_PROGRESS.
    Teach opts_next_list(), opts_type_int() and opts_type_uint64() to handle
    them.
    
    Also enumerate explicitly what functions are valid to call in what modes:
    - opts_next_list() is valid to call while flattening a range,
    - opts_end_list(): ditto,
    - lookup_scalar() is invalid to call during flattening; generated qapi
      traversal code must continue asking for the same kind of signed/unsigned
      list element until the interval is fully flattened,
    - processed(): ditto.
    
    List mode restrictions are always formulated in positive / inclusive
    sense. The restrictions for lookup_scalar() and processed() are
    automatically satisfied by current qapi traversals if the schema to build
    is compatible with OptsVisitor.
    
    The new list modes are not entered yet.
    
    Signed-off-by: default avatarLaszlo Ersek <lersek@redhat.com>
    Tested-by: default avatarWanlong Gao <gaowanlong@cn.fujitsu.com>
    Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
Loading