Added is_Const
[libfirm] / ir / adt / pset.h
index 9a42d1b..10549e8 100644 (file)
  */
 int pset_default_ptr_cmp(const void *x, const void *y);
 
+/**
+ * The abstract type of a pset (Set of pointers).
+ *
+ * This kind of sets stores only pointer to elements, the elements itself
+ * must be stored somewere else.
+ *
+ * @see set
+ */
+typedef struct pset pset;
+
 /*
  * Define some convenience macros using the predefined hash function.
  */
@@ -35,16 +45,8 @@ int pset_default_ptr_cmp(const void *x, const void *y);
 #define pset_find_ptr(set,key) pset_find(set, key, HASH_PTR(key))
 #define pset_new_ptr(slots) new_pset(pset_default_ptr_cmp, slots)
 #define pset_new_ptr_default() pset_new_ptr(64)
+void    pset_insert_pset_ptr(pset *target, pset *src); /* Insertss all elements of src in target. */
 
-/**
- * The abstract type of a pset (Set of pointers).
- *
- * This kind of sets stores only pointer to elements, the elements itself
- * must be stored somewere else.
- *
- * @see set
- */
-typedef struct pset pset;
 
 /** The entry of a pset, representing an element pointer in the set and it's meta-information */
 typedef struct {
@@ -114,7 +116,7 @@ void *pset_find (pset *pset, const void *key, unsigned hash);
  * @return a pointer to the inserted element
  *
  * @note
- *    It is not possible to insert on element more than once. If a element
+ *    It is not possible to insert an element more than once. If an element
  *    that should be inserted is already in the set, this functions does
  *    nothing but returning its already existing set_entry.
 
@@ -131,7 +133,7 @@ void *pset_insert (pset *pset, const void *key, unsigned hash);
  * @return a pointer to the pset_entry of the inserted element
  *
  * @note
- *    It is not possible to insert on element more than once. If a element
+ *    It is not possible to insert an element more than once. If an element
  *    that should be inserted is already in the pset, this functions does
  *    nothing but returning its pset_entry.
  */
@@ -140,8 +142,8 @@ pset_entry *pset_hinsert (pset *pset, const void *key, unsigned hash);
 /**
  * Removes an element from a pset.
  *
- * @param pset  the pset to insert in
- * @param key   a pointer to the element to be inserted
+ * @param pset  the pset to delete in
+ * @param key   a pointer to the element to be deleted
  * @param hash  the hash-value of the element
  *
  * @return