Pavel Fedin <p.fe...@samsung.com> writes: > Avoid repetitive lookup of every property in array starting from 0 by adding > one more property which caches last used index. Every time an array is > expanded the index is picked up from this cache. > > The property is a uint32_t and its name is name of the array plus '#' > ('name#'). It has getter function in order to allow to inspect it from > within monitor.
Do we really want '#' in property names? Elsewhere, we require names to be id_wellformed(). I've long argued for doing that consistently[*], but QOM still doesn't. I've always hated "automatic arrayification", not least because it encodes semantics in property names. I tried to replace it[**], but Paolo opposed it. Which makes him the go-to guy for reviewing anything that touches it ;-P [*] http://lists.gnu.org/archive/html/qemu-devel/2014-10/msg00030.html [**] http://lists.gnu.org/archive/html/qemu-devel/2014-10/msg00030.html