mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-10-29 03:27:28 +00:00
Currently the ObjectProperty iterator API works as follows:
ObjectPropertyIterator *iter;
iter = object_property_iter_init(obj);
while ((prop = object_property_iter_next(iter))) {
...
}
object_property_iter_free(iter);
This has the benefit that the ObjectPropertyIterator struct
can be opaque, but has the downside that callers need to
explicitly call a free function. It is also not in keeping
with iterator style used elsewhere in QEMU/GLib2.
This patch changes the API to use stack allocation instead:
ObjectPropertyIterator iter;
object_property_iter_init(&iter, obj);
while ((prop = object_property_iter_next(&iter))) {
...
}
Backports commit 7746abd8e9ee9db20c0b0fdb19504f163ba3cbea from qemu
|
||
|---|---|---|
| .. | ||
| crypto | ||
| exec | ||
| fpu | ||
| hw | ||
| qapi | ||
| qemu | ||
| qom | ||
| sysemu | ||
| config.h | ||
| elf.h | ||
| glib_compat.h | ||
| qemu-common.h | ||