mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-11-05 10:34:59 +00:00
When a function returns a null pointer on error and only on error, you
can do
if (!foo(foos, errp)) {
... handle error ...
}
instead of the more cumbersome
Error *err = NULL;
if (!foo(foos, &err)) {
error_propagate(errp, err);
... handle error ...
}
A StringProperty's getter, however, may return null on success! We
then fail to call visit_type_str().
Screwed up in 6a146eb, v1.1.
Fails tests/qom-test in my current, heavily hacked QAPI branch. No
reproducer for master known (but I didn't look hard).
Backports commit a479b21c111a87a50203a7413c4e5ec419fc88dd from qemu
|
||
|---|---|---|
| .. | ||
| container.c | ||
| cpu.c | ||
| Makefile.objs | ||
| object.c | ||
| qom-qobject.c | ||