seamlessly.
* New function SD_workstation_dump to display various information
+ XBT:
+ * Functions xbt_dict_hash() and xbt_dict_hash_ext() are made public,
+ and renamed to xbt_str_hash() and xbt_str_ext()._
+
-- $date Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
SimGrid (3.7.1) stable; urgency=low
/**
* @brief Returns the hash code of a string.
*/
-static XBT_INLINE unsigned int xbt_dict_hash_ext(const char *str, int str_len)
+static XBT_INLINE unsigned int xbt_str_hash_ext(const char *str, int str_len)
{
#ifdef DJB2_HASH_FUNCTION
/**
* @brief Returns the hash code of a string.
*/
-static XBT_INLINE unsigned int xbt_dict_hash(const char *str)
+static XBT_INLINE unsigned int xbt_str_hash(const char *str)
{
#ifdef DJB2_HASH_FUNCTION
/* fast implementation of djb2 algorithm */
RngStream rng_stream = NULL;
rng_stream = RngStream_CopyStream(common_rng_stream);
- id_hash = xbt_dict_hash(id);
+ id_hash = xbt_str_hash(id);
RngStream_AdvanceState(rng_stream, 0, id_hash);
trace = xbt_new0(s_tmgr_trace_t, 1);
void *data, void_f_pvoid_t free_ctn)
{
- unsigned int hash_code = xbt_dict_hash_ext(key, key_len);
+ unsigned int hash_code = xbt_str_hash_ext(key, key_len);
xbt_dictelm_t current, previous = NULL;
xbt_assert(dict);
{
- unsigned int hash_code = xbt_dict_hash_ext(key, key_len);
+ unsigned int hash_code = xbt_str_hash_ext(key, key_len);
xbt_dictelm_t current;
xbt_assert(dict);
int key_len)
{
- unsigned int hash_code = xbt_dict_hash_ext(key, key_len);
+ unsigned int hash_code = xbt_str_hash_ext(key, key_len);
xbt_dictelm_t current;
xbt_assert(dict);
XBT_INLINE void *xbt_dict_get(xbt_dict_t dict, const char *key)
{
- unsigned int hash_code = xbt_dict_hash(key);
+ unsigned int hash_code = xbt_str_hash(key);
xbt_dictelm_t current;
xbt_assert(dict);
*/
XBT_INLINE void *xbt_dict_get_or_null(xbt_dict_t dict, const char *key)
{
- unsigned int hash_code = xbt_dict_hash(key);
+ unsigned int hash_code = xbt_str_hash(key);
xbt_dictelm_t current;
xbt_assert(dict);
{
- unsigned int hash_code = xbt_dict_hash_ext(key, key_len);
+ unsigned int hash_code = xbt_str_hash_ext(key, key_len);
xbt_dictelm_t current, previous = NULL;
xbt_assert(dict);