projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Obstack: Deleted the special windows version, make Win64 warning free.
[libfirm]
/
include
/
libfirm
/
adt
/
eset.h
diff --git
a/include/libfirm/adt/eset.h
b/include/libfirm/adt/eset.h
index
60284fd
..
a68328b
100644
(file)
--- a/
include/libfirm/adt/eset.h
+++ b/
include/libfirm/adt/eset.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.
*
@@
-24,10
+24,13
@@
* @author Hubert Schmid
* @date 09.06.2002
* @version $Id$
* @author Hubert Schmid
* @date 09.06.2002
* @version $Id$
+ * @deprecated
*/
#ifndef FIRM_ADT_ESET_H
#define FIRM_ADT_ESET_H
*/
#ifndef FIRM_ADT_ESET_H
#define FIRM_ADT_ESET_H
+#include "../begin.h"
+
/**
* "eset" is a set of addresses. The addresses are used for element
* compare and hash calculation.
/**
* "eset" is a set of addresses. The addresses are used for element
* compare and hash calculation.
@@
-36,23
+39,23
@@
typedef struct eset eset;
/** Creates a new empty set. */
typedef struct eset eset;
/** Creates a new empty set. */
-eset *eset_create(void);
+
FIRM_API
eset *eset_create(void);
/**
* Creates a copy of the given set. Does NOT work if NULL is contained in source. */
/**
* Creates a copy of the given set. Does NOT work if NULL is contained in source. */
-eset *eset_copy(eset *source);
+
FIRM_API
eset *eset_copy(eset *source);
/** Deletes a set. */
/** Deletes a set. */
-void eset_destroy(eset *s);
+
FIRM_API
void eset_destroy(eset *s);
/** Returns the number of elements in the set. */
/** Returns the number of elements in the set. */
-int eset_count(eset *s);
+
FIRM_API
int eset_count(eset *s);
/** Inserts an address into the set. */
/** Inserts an address into the set. */
-void eset_insert(eset *s, void *p);
+
FIRM_API
void eset_insert(eset *s, void *p);
/** Checks, whether an address is element of a set. */
/** Checks, whether an address is element of a set. */
-int eset_contains(eset *s, void *p);
+
FIRM_API
int eset_contains(eset *s, void *p);
/**
* Starts the iteration over a set and returns the first element or NULL
/**
* Starts the iteration over a set and returns the first element or NULL
@@
-60,7
+63,7
@@
int eset_contains(eset *s, void *p);
*
* @note: It is NOT possible to add new elements while iterating through a set.
*/
*
* @note: It is NOT possible to add new elements while iterating through a set.
*/
-void *eset_first(eset *s);
+
FIRM_API
void *eset_first(eset *s);
/**
* Continues iteration through a set and returns the next element or NULL if the
/**
* Continues iteration through a set and returns the next element or NULL if the
@@
-68,9
+71,14
@@
void *eset_first(eset *s);
*
* @note: It is NOT possible to add new elements while iterating through a set.
*/
*
* @note: It is NOT possible to add new elements while iterating through a set.
*/
-void *eset_next(eset *s);
+
FIRM_API
void *eset_next(eset *s);
/** Inserts all elements of source into target (union). Does NOT work if NULL is contained in source. */
/** Inserts all elements of source into target (union). Does NOT work if NULL is contained in source. */
-void eset_insert_all(eset *target, eset *source);
+FIRM_API void eset_insert_all(eset *target, eset *source);
+
+#define eset_foreach(eset, type, iter) \
+ for ((iter) = (type)eset_first((eset)); (iter) != NULL; (iter) = (type)eset_next((eset)))
+
+#include "../end.h"
#endif
#endif