1 /* Binary compatibility hash implementations for Objective C.
2 Copyright (C) 2005 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GCC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING. If not, write to
18 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
21 /* As a special exception, if you link this library with files
22 compiled with GCC to produce an executable, this does not cause
23 the resulting executable to be covered by the GNU General Public License.
24 This exception does not however invalidate any other reasons why
25 the executable file might be covered by the GNU General Public License. */
27 #define OBJC_IGNORE_DEPRECATED_API 1
28 #include "objc/hash.h"
31 hash_new (unsigned int size
,
32 hash_func_type hash_func
,
33 compare_func_type compare_func
)
35 return objc_hash_new(size
, hash_func
, compare_func
);
39 hash_delete(cache_ptr cache
)
41 objc_hash_delete(cache
);
45 hash_add (cache_ptr
*cachep
, const void *key
, void *value
)
47 objc_hash_add(cachep
, key
, value
);
51 hash_remove (cache_ptr cache
, const void *key
)
53 objc_hash_remove (cache
, key
);
57 hash_next (cache_ptr cache
, node_ptr node
)
59 return objc_hash_next (cache
, node
);
63 hash_value_for_key (cache_ptr cache
, const void *key
)
65 return objc_hash_value_for_key (cache
, key
);
69 hash_is_key_in_hash (cache_ptr cache
, const void *key
)
71 return objc_hash_is_key_in_hash (cache
, key
);
75 hash_ptr (cache_ptr cache
, const void *key
)
77 return objc_hash_ptr (cache
, key
);
81 hash_string (cache_ptr cache
, const void *key
)
83 return objc_hash_string (cache
, key
);
87 compare_ptrs (const void *k1
, const void *k2
)
89 return objc_compare_ptrs (k1
, k2
);
93 compare_strings (const void *k1
, const void *k2
)
95 return objc_compare_strings (k1
, k2
);