2 * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
6 * This file may be distributed and/or modified under the terms of the
7 * GNU General Public License version 2 as published by the Free Software
8 * Foundation and appearing in the file LICENSE.GPL included in the
9 * packaging of this file.
11 * Licensees holding valid libFirm Professional Edition licenses may use
12 * this file in accordance with the libFirm Commercial License.
13 * Agreement provided with the Software.
15 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * @brief implementation of pset_new
23 * @author Matthias Braun
30 /** probing method: quadratic probing */
32 #define HashSet pset_new_t
33 #define HashSetIterator pset_new_iterator_t
34 #define ValueType void*
35 #define NullValue NULL
36 #define DeletedValue ((void*)-1)
37 #define KeysEqual(this,key1,key2) 1
38 #define SetRangeEmpty(ptr,size) memset(ptr, 0, (size) * sizeof(HashSetEntry))
40 #define hashset_init pset_new_init
41 #define hashset_init_size pset_new_init_size
42 #define hashset_destroy pset_new_destroy
43 #define hashset_insert pset_new_insert
44 #define hashset_remove pset_new_remove
45 #define hashset_find pset_new_find
46 #define hashset_size pset_new_size
47 #define hashset_iterator_init pset_new_iterator_init
48 #define hashset_iterator_next pset_new_iterator_next
49 #define hashset_remove_iterator pset_new_remove_iterator
53 int pset_new_contains(const pset_new_t *pset_new, const ValueType val)
55 return pset_new_find(pset_new, val);