mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
qom: introduce object_property_help()
Let's factor out the code to format a help string for a property. We are going to reuse it in qdev next, which will bring some consistency. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-25-marcandre.lureau@redhat.com> [Adjust for removal of object_property_get_default, move default after description. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
c1f472ea65
commit
4df8161673
2 changed files with 41 additions and 17 deletions
|
@ -1837,6 +1837,19 @@ Object *container_get(Object *root, const char *path);
|
|||
*/
|
||||
size_t object_type_get_instance_size(const char *typename);
|
||||
|
||||
/**
|
||||
* object_property_help:
|
||||
* @name: the name of the property
|
||||
* @type: the type of the property
|
||||
* @defval: the default value
|
||||
* @description: description of the property
|
||||
*
|
||||
* Returns: a user-friendly formatted string describing the property
|
||||
* for help purposes.
|
||||
*/
|
||||
char *object_property_help(const char *name, const char *type,
|
||||
QObject *defval, const char *description);
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(Object, object_unref)
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue