entry_return);
(void **)&new_entry);
_cairo_cache_lookup (cairo_cache_t *cache,		     void *key,		     void **entry_return){    unsigned long idx;    cairo_status_t status = CAIRO_STATUS_SUCCESS;    cairo_cache_entry_base_t **slot = NULL, *new_entry;    _cache_sane_state (cache);#ifdef CAIRO_MEASURE_CACHE_PERFORMANCE    if ((cache->hits + cache->misses) % 0xffff == 0)	printf("cache %p stats: size %ld, live %ld, load %.2f\n"	       "                      mem %ld/%ld, hit %ld, miss %ld\n"	       "                      probe %ld, %.2f probe/access\n", 	       cache,	       cache->arrangement->size, 	       cache->live_entries, 	       _load_factor (cache),	       cache->used_memory, 	       cache->max_memory,	       cache->hits, 	       cache->misses, 	       cache->probes,	       ((double) cache->probes) 	       / ((double) (cache->hits + 			    cache->misses + 1)));#endif        /* See if we have an entry in the table already. */    slot = _find_exact_live_entry_for (cache, key);    if (slot != NULL) {#ifdef CAIRO_MEASURE_CACHE_PERFORMANCE	cache->hits++;#endif	*entry_return = *slot;	return status;    }#ifdef CAIRO_MEASURE_CACHE_PERFORMANCE    cache->misses++;#endif    /* Build the new entry. */    status = cache->backend->create_entry (cache, key, 					   entry_return);    if (status != CAIRO_STATUS_SUCCESS)	return status;    new_entry = (cairo_cache_entry_base_t *) (*entry_return);    /* Store the hash value in case the backend forgot. */    new_entry->hashcode = cache->backend->hash (cache, key);    /* Make some entries die if we're under memory pressure. */    while (cache->live_entries > 0 &&	   ((cache->max_memory - cache->used_memory) < new_entry->memory)) {	idx = _random_live_entry (cache);	assert (idx < cache->arrangement->size);	_entry_destroy (cache, idx);    }        /* Can't assert this; new_entry->memory may be larger than max_memory */    /* assert(cache->max_memory >= (cache->used_memory + new_entry->memory)); */        /* Make room in the table for a new slot. */    status = _resize_cache (cache, cache->live_entries + 1);    if (status != CAIRO_STATUS_SUCCESS) {	cache->backend->destroy_entry (cache, new_entry);	*entry_return = NULL;	return status;    }    slot = _find_available_entry_for (cache, key);    assert(slot != NULL);        /* Store entry in slot and increment statistics. */    *slot = new_entry;    cache->live_entries++;    cache->used_memory += new_entry->memory;    _cache_sane_state (cache);    return status;}