Skip to content
  • Felipe Franciosi's avatar
    836e1b38
    qom/object: enable setter for uint types · 836e1b38
    Felipe Franciosi authored
    
    
    Traditionally, the uint-specific property helpers only offer getters.
    When adding object (or class) uint types, one must therefore use the
    generic property helper if a setter is needed (and probably duplicate
    some code writing their own getters/setters).
    
    This enhances the uint-specific property helper APIs by adding a
    bitwise-or'd 'flags' field and modifying all clients of that API to set
    this paramater to OBJ_PROP_FLAG_READ. This maintains the current
    behaviour whilst allowing others to also set OBJ_PROP_FLAG_WRITE (or use
    the more convenient OBJ_PROP_FLAG_READWRITE) in the future (which will
    automatically install a setter). Other flags may be added later.
    
    Signed-off-by: default avatarFelipe Franciosi <felipe@nutanix.com>
    Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    836e1b38
    qom/object: enable setter for uint types
    Felipe Franciosi authored
    
    
    Traditionally, the uint-specific property helpers only offer getters.
    When adding object (or class) uint types, one must therefore use the
    generic property helper if a setter is needed (and probably duplicate
    some code writing their own getters/setters).
    
    This enhances the uint-specific property helper APIs by adding a
    bitwise-or'd 'flags' field and modifying all clients of that API to set
    this paramater to OBJ_PROP_FLAG_READ. This maintains the current
    behaviour whilst allowing others to also set OBJ_PROP_FLAG_WRITE (or use
    the more convenient OBJ_PROP_FLAG_READWRITE) in the future (which will
    automatically install a setter). Other flags may be added later.
    
    Signed-off-by: default avatarFelipe Franciosi <felipe@nutanix.com>
    Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading