/* dict - a generic dictionary, variation over hash table */
-/* Copyright (c) 2003-2010 Martin Quinson. All rights reserved. */
+/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
xbt_dictelm_t current, previous = NULL;
xbt_assert(dict);
- DEBUG5("ADD %ld->%ld; hash = %d, size = %d, & = %d", key, data, hash_code,
+ DEBUG5("ADD %zu->%zu; hash = %d, size = %d, & = %d", key, data, hash_code,
dict->table_size, hash_code & dict->table_size);
current = dict->table[hash_code & dict->table_size];
while (current != NULL &&
}
if (current == NULL)
- THROW1(not_found_error, 0, "key %ld not found", key);
+ THROW1(not_found_error, 0, "key %zu not found", key);
if (previous != NULL) {
previous->next = current->next;
}
static void debuged_addi(xbt_dict_t head, uintptr_t key, uintptr_t data) {
- xbt_test_log2("Add %ld under %ld", data, key);
+ xbt_test_log2("Add %zu under %zu", data, key);
xbt_dicti_set(head, key, data);
if (XBT_LOG_ISENABLED(xbt_dict, xbt_log_priority_debug)) {
}
uintptr_t stored_data = xbt_dicti_get(head, key);
xbt_test_assert3(stored_data==data,
- "Retrieved data (%ld) is not what I just stored (%ld) under key %ld",stored_data,data,key);
+ "Retrieved data (%zu) is not what I just stored (%zu) under key %zu",stored_data,data,key);
}
XBT_TEST_UNIT("dicti", test_dict_scalar, "Scalar data and key management")