On 06/29/2017 01:28 PM, Emilio G. Cota wrote:
+/* @key is already in the tree so it's safe to use container_of on it */ +static gint tc_ptr_cmp(gconstpointer candidate, gconstpointer key) +{ + uintptr_t a = *(uintptr_t *)candidate; + const TranslationBlock *tb = container_of(key, TranslationBlock, tc_ptr);
This I'm not keen on. It'd be one thing if it was our own datastructure, but I see nothing in the GTree documentation that says that the comparison must always be done this way.
r~