[cairo] You call this a cache?!

Alexander Larsson alexl at redhat.com
Mon Dec 20 06:02:42 PST 2004


This patch helps a bit. :)

Index: cairo_cache.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_cache.c,v
retrieving revision 1.4
diff -u -p -r1.4 cairo_cache.c
--- cairo_cache.c	23 Nov 2004 21:38:09 -0000	1.4
+++ cairo_cache.c	20 Dec 2004 14:01:31 -0000
@@ -185,6 +185,9 @@ _cache_lookup (cairo_cache_t *cache,
 		&& (*probe)->hashcode == hash
 		&& predicate (cache, key, *probe))
 		return probe;
+	    if (*probe == NULL)
+	      /* Found an empty spot, there can't be a match */
+	      return NULL;
 	}
 	else
 	{

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl at redhat.com    alla at lysator.liu.se 
He's an old-fashioned neurotic shaman on the hunt for the last specimen of a 
great and near-mythical creature. She's a sharp-shooting foul-mouthed Hell's 
Angel with a birthmark shaped like Liberty's torch. They fight crime! 




More information about the cairo mailing list