* \param key the key to set the new data
* \param key_len the size of the \a key
* \param data the data to add in the dict
- * \param free_ctn function to call with (\a key as argument) when
- * \a key is removed from the dictionary
+ * \param free_ctn function to call with (\a data as argument) when
+ * \a data is removed from the dictionary
*
* Set the \a data in the structure under the \a key, which can be any kind
* of data, as long as its length is provided in \a key_len.
* \param dict the dict
* \param key the key to set the new data
* \param data the data to add in the dict
- * \param free_ctn function to call with (\a key as argument) when
- * \a key is removed from the dictionary
+ * \param free_ctn function to call with (\a data as argument) when
+ * \a data is removed from the dictionary
*
* set the \a data in the structure under the \a key, which is a
* null terminated string.
}
if (current == NULL)
- THROW2(not_found_error, 0, "key %.*s not found", key_len, key);
+ THROWF(not_found_error, 0, "key %.*s not found", key_len, key);
return current->content;
}
current = current->next;
if (current == NULL)
- THROW1(not_found_error, 0, "key %s not found", key);
+ THROWF(not_found_error, 0, "key %s not found", key);
return current->content;
}
}
if (current == NULL)
- THROW2(not_found_error, 0, "key %.*s not found", key_len, key);
+ THROWF(not_found_error, 0, "key %.*s not found", key_len, key);
if (previous != NULL) {
previous->next = current->next;
}
if (current == NULL)
- THROW1(not_found_error, 0, "key %zu not found", key);
+ THROWF(not_found_error, 0, "key %zu not found", key);
if (previous != NULL) {
previous->next = current->next;
TRY {
data = xbt_dict_get(head, data);
- THROW1(unknown_error, 0,
+ THROWF(unknown_error, 0,
"Found something which shouldn't be there (%s)", data);
} CATCH(e) {
if (e.category != not_found_error)
xbt_dict_foreach(dict, cursor, key, data) {
effective++;
key2 = xbt_dict_get_key(dict, data);
- xbt_assert2(!strcmp(key, key2),
+ xbt_assert(!strcmp(key, key2),
"The data was registered under %s instead of %s as expected",
key2, key);
}