create homogeneous dictionaries, where all the elements share the
same free function. Non homogeneous dictionaries will be
deprecated in the next release.
+ * Dicts: dicts of scalar elements (xbt_dicti_*) are deprecated.
* mmalloc module:
- cleanups and simplifications to make it maintainable again
- exotic features (such as memalign and valloc) were removed
XBT_PUBLIC(void) xbt_dict_remove_ext(xbt_dict_t dict, const char *key,
int key_len);
-
+#ifdef XBT_USE_DEPRECATED
XBT_PUBLIC(void) xbt_dicti_set(xbt_dict_t dict, uintptr_t key,
uintptr_t data);
XBT_PUBLIC(uintptr_t) xbt_dicti_get(xbt_dict_t dict, uintptr_t key);
XBT_PUBLIC(void) xbt_dicti_remove(xbt_dict_t dict, uintptr_t key);
-
+#endif
/** @} */
/** @defgroup XBT_dict_curs Cursors on dictionaries
xbt_dict_remove_ext(dict, key, strlen(key));
}
+#ifdef XBT_USE_DEPRECATED
/**
* \brief Add data to the dict (arbitrary key)
* \param dict the container
{
xbt_dict_remove_ext(dict, (void *)&key, sizeof key);
}
-
+#endif
/**
* \brief Remove all data from the dict
xbt_dict_free(&head);
}
+#ifdef XBT_USE_DEPRECATED
static void debuged_addi(xbt_dict_t head, uintptr_t key, uintptr_t data)
{
uintptr_t stored_data = 0;
"Retrieved data (%zu) is not what I just stored (%zu) under key %zu",
stored_data, data, key);
}
+#endif
XBT_TEST_UNIT("dicti", test_dict_scalar, "Scalar data and key management")
{
+#if XBT_USE_DEPRECATED
xbt_test_add("Fill in the dictionnary");
head = xbt_dict_new();
debuged_addi(head, 0, 0);
xbt_dict_free(&head);
+#endif
}
#define NB_ELM 20000