Skip to content
Snippets Groups Projects
user avatar
Michael S. Tsirkin authored
g_array_get_element_size was only added in glib 2.14,
there's no way to find element size in with an older glib.

Fortunately we only use a single table (linker) where element size > 1.
Switch element size to 1 everywhere, then we can just look at len field
to get table size in bytes.

Add an assert to make sure we catch any violations of this rule.

Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Reported-by: default avatarRichard Henderson <rth@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
fd8f5e37
History