projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
beprefalloc: fix assignment of big values
[libfirm]
/
ir
/
adt
/
pset_new.h
diff --git
a/ir/adt/pset_new.h
b/ir/adt/pset_new.h
index
7ff0d93
..
77feb7c
100644
(file)
--- a/
ir/adt/pset_new.h
+++ b/
ir/adt/pset_new.h
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 1995-200
7
University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-200
8
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
*
* This file is part of libFirm.
*
@@
-22,7
+22,6
@@
* @date 17.03.2007
* @brief hashset containing pointers
* @author Matthias Braun
* @date 17.03.2007
* @brief hashset containing pointers
* @author Matthias Braun
- * @version $Id$
*
* @note This has been named pset_new_new for now until all code has been
* changed to use this instead of the old deprecated pset_new functions!
*
* @note This has been named pset_new_new for now until all code has been
* changed to use this instead of the old deprecated pset_new functions!
@@
-32,6
+31,10
@@
#ifndef FIRM_ADT_PSET_NEW_H
#define FIRM_ADT_PSET_NEW_H
#ifndef FIRM_ADT_PSET_NEW_H
#define FIRM_ADT_PSET_NEW_H
+#include <stdbool.h>
+
+/** @cond PRIVATE */
+
#define HashSet pset_new_t
#define HashSetIterator pset_new_iterator_t
#define ValueType void*
#define HashSet pset_new_t
#define HashSetIterator pset_new_iterator_t
#define ValueType void*
@@
-42,6
+45,14
@@
#undef HashSetIterator
#undef ValueType
#undef HashSetIterator
#undef ValueType
+/** @endcond */
+
+/** a pointer (hash)set */
+typedef struct pset_new_t pset_new_t;
+/** iterator over a pointer set.
+ * @see #pset_new_t */
+typedef struct pset_new_iterator_t pset_new_iterator_t;
+
/**
* Initializes a pset_new
*
/**
* Initializes a pset_new
*
@@
-52,8
+63,8
@@
void pset_new_init(pset_new_t *pset_new);
/**
* Initializes a pset_new
*
/**
* Initializes a pset_new
*
- * @param pset_new
Pointer to allocated space for the pset_new
- * @param expected_elements Number of elements expected in the pset_new (rougly)
+ * @param pset_new Pointer to allocated space for the pset_new
+ * @param expected_elements Number of elements expected in the pset_new (roug
h
ly)
*/
void pset_new_init_size(pset_new_t *pset_new, size_t expected_elements);
*/
void pset_new_init_size(pset_new_t *pset_new, size_t expected_elements);
@@
-70,9
+81,9
@@
void pset_new_destroy(pset_new_t *pset_new);
*
* @param pset_new Pointer to the pset_new
* @param ptr Pointer to insert into the pset_new
*
* @param pset_new Pointer to the pset_new
* @param ptr Pointer to insert into the pset_new
- * @returns
1 if the pointer was inserted, 0
if it was already there
+ * @returns
true if the pointer was inserted, false
if it was already there
*/
*/
-
int
pset_new_insert(pset_new_t *pset_new, void *ptr);
+
bool
pset_new_insert(pset_new_t *pset_new, void *ptr);
/**
* Removes an element from a pset_new. Does nothing if the pset_new doesn't contain the
/**
* Removes an element from a pset_new. Does nothing if the pset_new doesn't contain the
@@
-88,9
+99,8
@@
void pset_new_remove(pset_new_t *pset_new, const void *ptr);
*
* @param pset_new Pointer to the pset_new
* @param ptr The pointer to test
*
* @param pset_new Pointer to the pset_new
* @param ptr The pointer to test
- * @returns 1 @p pset_new contains the @p ptr, 0 otherwise
*/
*/
-
int
pset_new_contains(const pset_new_t *pset_new, const void *ptr);
+
bool
pset_new_contains(const pset_new_t *pset_new, const void *ptr);
/**
* Returns the number of pointers contained in the pset_new
/**
* Returns the number of pointers contained in the pset_new
@@
-131,9
+141,9
@@
void pset_new_remove_iterator(pset_new_t *pset_new, const pset_new_iterator_t *i
/**
* Convenience macro for iterating over a pset_new.
*/
/**
* Convenience macro for iterating over a pset_new.
*/
-#define foreach_pset_new(pset_new, ptr, iter) \
+#define foreach_pset_new(pset_new,
type,
ptr, iter) \
for(pset_new_iterator_init(&iter, pset_new), \
for(pset_new_iterator_init(&iter, pset_new), \
- ptr = pset_new_iterator_next(&iter); \
- ptr != NULL; ptr = pset_new_iterator_next(&iter))
+ ptr =
(type)
pset_new_iterator_next(&iter); \
+ ptr != NULL; ptr =
(type)
pset_new_iterator_next(&iter))
#endif
#endif