mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
qom: introduce object_class_get_list_sorted
Unify half a dozen copies of very similar code (the only difference being whether comparisons were case-sensitive) and use it also in Tricore, which did not do any sorting of CPU model names. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
819fd4699c
commit
47c66009ab
8 changed files with 30 additions and 65 deletions
|
@ -913,6 +913,17 @@ void object_class_foreach(void (*fn)(ObjectClass *klass, void *opaque),
|
|||
GSList *object_class_get_list(const char *implements_type,
|
||||
bool include_abstract);
|
||||
|
||||
/**
|
||||
* object_class_get_list_sorted:
|
||||
* @implements_type: The type to filter for, including its derivatives.
|
||||
* @include_abstract: Whether to include abstract classes.
|
||||
*
|
||||
* Returns: A singly-linked list of the classes in alphabetical
|
||||
* case-insensitive order.
|
||||
*/
|
||||
GSList *object_class_get_list_sorted(const char *implements_type,
|
||||
bool include_abstract);
|
||||
|
||||
/**
|
||||
* object_ref:
|
||||
* @obj: the object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue