/** * _cairo_cache_remove_random: * @cache: a cache * * Remove a random entry from the cache. * * Return value: %TRUE if an entry was successfully removed. * %FALSE if there are no entries that can be removed. **/ static cairo_bool_t _cairo_cache_remove_random (cairo_cache_t *cache) { cairo_cache_entry_t *entry; entry = _cairo_hash_table_random_entry (cache->hash_table, NULL); if (unlikely (entry == NULL)) return FALSE; _cairo_cache_remove (cache, entry); return TRUE; }
static void _cairo_cache_pluck (void *entry, void *closure) { _cairo_cache_remove ((cairo_cache_t *)closure, (cairo_cache_entry_t *)entry); }
static void _cairo_cache_pluck (void *entry, void *closure) { _cairo_cache_remove (closure, entry); }