unicorn/qemu/qapi
Eric Blake ef357d06bc
qapi: Simplify use of range.h
Calling our function g_list_insert_sorted_merged is a misnomer,
since we are NOT writing a glib function. Furthermore, we are
making every caller pass the same comparator function of
range_merge(): any caller that would try otherwise would break
in weird ways since our internal call to ranges_can_merge() is
hard-coded to operate only on ranges, rather than paying
attention to the caller's comparator.

Better is to fix things so that callers don't have to care about
our internal comparator, by picking a function name and updating
the parameter type away from a gratuitous use of void*, to make
it obvious that we are operating specifically on a list of ranges
and not a generic list. Plus, refactoring the code here will
make it easier to plug a memory leak in the next patch.

range_compare() is now internal only, and moves to the .c file.

Backports commit 7c47959d0cb05db43014141a156ada0b6d53a750 from qemu
2018-02-25 00:02:42 -05:00
..
common.json qapi: Add alias for ErrorClass 2018-02-19 20:38:51 -05:00
Makefile.objs remove glib dependency by provide compatible replacements 2016-12-18 14:56:58 -08:00
qapi-dealloc-visitor.c qapi: Simplify semantics of visit_next_list() 2018-02-23 19:50:26 -05:00
qapi-visit-core.c qapi: Change visit_type_FOO() to no longer return partial objects 2018-02-23 19:53:17 -05:00
qmp-input-visitor.c qapi: Simplify semantics of visit_next_list() 2018-02-23 19:50:26 -05:00
qmp-output-visitor.c qapi: Simplify semantics of visit_next_list() 2018-02-23 19:50:26 -05:00
string-input-visitor.c qapi: Simplify use of range.h 2018-02-25 00:02:42 -05:00