summaryrefslogtreecommitdiff
path: root/src/cairo-hash-private.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-11-07 20:30:33 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2008-11-07 20:50:34 +0000
commit2b32c8b9e572c96ce8ba5c7d43b568f18f6da295 (patch)
tree5bbac3fa688087fb74d3598105dd50786c68816c /src/cairo-hash-private.h
parentd15fb9344bf86dd52cda0b43d3dfc49397fd84ec (diff)
downloadcairo-2b32c8b9e572c96ce8ba5c7d43b568f18f6da295.tar.gz
[hash] Return lookup entry.
Use the return value to return the result from _cairo_hash_table_lookup() (as opposed to filling an output parameter on the stack) as this (a) results in cleaner code (no strict-alias breaking pointer casts), (b) produces a smaller binary and (c) is measurably faster.
Diffstat (limited to 'src/cairo-hash-private.h')
-rw-r--r--src/cairo-hash-private.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cairo-hash-private.h b/src/cairo-hash-private.h
index 9101f2ed7..a0be097a8 100644
--- a/src/cairo-hash-private.h
+++ b/src/cairo-hash-private.h
@@ -63,10 +63,9 @@ _cairo_hash_table_create (cairo_hash_keys_equal_func_t keys_equal);
cairo_private void
_cairo_hash_table_destroy (cairo_hash_table_t *hash_table);
-cairo_private cairo_bool_t
+cairo_private void *
_cairo_hash_table_lookup (cairo_hash_table_t *hash_table,
- cairo_hash_entry_t *key,
- cairo_hash_entry_t **entry_return);
+ cairo_hash_entry_t *key);
cairo_private void *
_cairo_hash_table_random_entry (cairo_hash_table_t *hash_table,
@@ -81,7 +80,7 @@ _cairo_hash_table_remove (cairo_hash_table_t *hash_table,
cairo_hash_entry_t *key);
cairo_private void
-_cairo_hash_table_foreach (cairo_hash_table_t *hash_table,
+_cairo_hash_table_foreach (cairo_hash_table_t *hash_table,
cairo_hash_callback_func_t hash_callback,
void *closure);