object: add object_property_set_default
commit0e76ed0a5da4c8540597c1ffac72705e04323f69
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 10 Jan 2020 15:30:23 +0000 (10 19:30 +0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 Jan 2020 19:59:13 +0000 (24 20:59 +0100)
tree6a5daf73b26ed25d72cc329ac23c29173d1905df
parent164c374b75f87c6765a705c4418ab7005a2d356f
object: add object_property_set_default

Add a default value to ObjectProperty and an implementation of
ObjectPropertyInit that uses it.  This will make it easier to show the
default in help messages.

Also provide convenience functions object_property_set_default_{bool,
str, int, uint}().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20200110153039.1379601-11-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/qom/object.h
qom/object.c