Improve dictionary lookup for strings.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3003 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1998-10-01 05:22:47 +00:00
parent c4337b9ca9
commit 1601128ae7
4 changed files with 80 additions and 5 deletions

View file

@ -562,12 +562,22 @@ o_map_key_at_key(o_map_t *map, const void *key)
const void *
o_map_value_at_key(o_map_t *map, const void *key)
{
#if 0
const void *value;
/* Use the grandfather function above... */
o_map_key_and_value_at_key(map, 0, &value, key);
return value;
#else
o_map_node_t *node;
/* Try and find the node for KEY. */
node = _o_map_node_for_key(map, key);
if (node != 0)
return node->value;
return 0;
#endif
}
const void **