mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
qom: Don't pass string table to object_get_enum() function
Now that properties can be explicitly registered as an enum type, there is no need to pass the string table to the object_get_enum() function. The object property registration already has a pointer to the string table. In changing this method signature, the hostmem backend object has to be converted to use the new enum property registration code, which simplifies it somewhat. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
a8e3fbedc8
commit
a3590dacce
5 changed files with 71 additions and 19 deletions
|
@ -1073,7 +1073,7 @@ int64_t object_property_get_int(Object *obj, const char *name,
|
|||
* object_property_get_enum:
|
||||
* @obj: the object
|
||||
* @name: the name of the property
|
||||
* @strings: strings corresponding to enums
|
||||
* @typename: the name of the enum data type
|
||||
* @errp: returns an error if this function fails
|
||||
*
|
||||
* Returns: the value of the property, converted to an integer, or
|
||||
|
@ -1081,7 +1081,7 @@ int64_t object_property_get_int(Object *obj, const char *name,
|
|||
* an enum).
|
||||
*/
|
||||
int object_property_get_enum(Object *obj, const char *name,
|
||||
const char * const strings[], Error **errp);
|
||||
const char *typename, Error **errp);
|
||||
|
||||
/**
|
||||
* object_property_get_uint16List:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue