+/**
+ * \brief Retrieve data from the dict (key considered as a uintptr_t)
+ *
+ * \param dict the dealer of data
+ * \param key the key to find data
+ * \return the data that we are looking for (or 0 if not found)
+ *
+ * Mixing uintptr_t keys with regular keys in the same dict is discouraged
+ */
+XBT_INLINE uintptr_t xbt_dicti_get(xbt_dict_t dict, uintptr_t key)
+{
+
+ unsigned int hash_code =
+ xbt_dict_hash_ext(((void *) &key), sizeof(uintptr_t));
+ xbt_dictelm_t current;
+
+ xbt_assert(dict);
+
+ current = dict->table[hash_code & dict->table_size];
+ while (current != NULL &&
+ (hash_code != current->hash_code
+ || sizeof(uintptr_t) != current->key_len
+ || (((uintptr_t) key) != ((uintptr_t) current->key)))) {
+ current = current->next;
+ }
+
+ if (current == NULL)
+ return 0;
+
+ return (uintptr_t) (current->content);
+}
+
+/** Remove a uintptr_t key from the dict */
+XBT_INLINE void xbt_dicti_remove(xbt_dict_t dict, uintptr_t key)
+{
+
+ unsigned int hash_code =
+ xbt_dict_hash_ext(((void *) &key), sizeof(uintptr_t));
+ xbt_dictelm_t current, previous = NULL;
+
+
+ current = dict->table[hash_code & dict->table_size];
+ while (current != NULL &&
+ (hash_code != current->hash_code
+ || sizeof(uintptr_t) != current->key_len
+ || (((uintptr_t) key) != ((uintptr_t) current->key)))) {
+ previous = current; /* save the previous node */
+ current = current->next;
+ }
+
+ if (current == NULL)
+ THROWF(not_found_error, 0, "key %zu not found", key);
+
+ if (previous != NULL) {
+ previous->next = current->next;
+ } else {
+ dict->table[hash_code & dict->table_size] = current->next;
+ }
+
+ if (!dict->table[hash_code & dict->table_size])
+ dict->fill--;
+
+ xbt_dictelm_free(current);
+ dict->count--;
+}
+
+