Skip to content
Snippets Groups Projects
  • Markus Armbruster's avatar
    a1307285
    qapi: Generalize struct member policy checking · a1307285
    Markus Armbruster authored
    
    The generated visitor functions call visit_deprecated_accept() and
    visit_deprecated() when visiting a struct member with special feature
    flag 'deprecated'.  This makes the feature flag visible to the actual
    visitors.  I want to make feature flag 'unstable' visible there as
    well, so I can add policy for it.
    
    To let me make it visible, replace these functions by
    visit_policy_reject() and visit_policy_skip(), which take the member's
    special features as an argument.  Note that the new functions have the
    opposite sense, i.e. the return value flips.
    
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Message-Id: <20211028102520.747396-6-armbru@redhat.com>
    Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
    Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
    [Unbreak forward visitor]
    a1307285
    History
    qapi: Generalize struct member policy checking
    Markus Armbruster authored
    
    The generated visitor functions call visit_deprecated_accept() and
    visit_deprecated() when visiting a struct member with special feature
    flag 'deprecated'.  This makes the feature flag visible to the actual
    visitors.  I want to make feature flag 'unstable' visible there as
    well, so I can add policy for it.
    
    To let me make it visible, replace these functions by
    visit_policy_reject() and visit_policy_skip(), which take the member's
    special features as an argument.  Note that the new functions have the
    opposite sense, i.e. the return value flips.
    
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Message-Id: <20211028102520.747396-6-armbru@redhat.com>
    Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
    Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
    [Unbreak forward visitor]