eset_count() added
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sun, 30 Oct 2005 14:14:51 +0000 (14:14 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sun, 30 Oct 2005 14:14:51 +0000 (14:14 +0000)
[r6831]

ir/adt/eset.c
ir/adt/eset.h

index 9ea922c..6dd23a9 100644 (file)
@@ -49,6 +49,10 @@ void eset_destroy(eset *s) {
   del_set((set *)s);
 }
 
+/* Returns the number of elements in the set. */
+int eset_count(eset *s) {
+  return set_count((set *)s);
+}
 
 void eset_insert(eset *s, void *p) {
   if (!eset_contains(s, p)) {
index 430117a..fbdb5e0 100644 (file)
@@ -30,6 +30,9 @@ eset *eset_copy(eset *source);
 /** Deletes a set. */
 void eset_destroy(eset *s);
 
+/** Returns the number of elements in the set. */
+int eset_count(eset *s);
+
 /** Inserts an address into the set. */
 void eset_insert(eset *s, void *p);