Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill old $Id$ command dating from CVS
[simgrid.git] / include / xbt / dict.h
index 41e613d..c90afbe 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /* xbt/dict.h -- api to a generic dictionary                                */
 
 /* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved.            */
@@ -13,6 +11,7 @@
 
 #include "xbt/misc.h"           /* SG_BEGIN_DECL */
 #include "xbt/dynar.h"          /* void_f_pvoid_t */
+#include <stdint.h> /* uintptr_t */
 
 SG_BEGIN_DECL();
 
@@ -90,6 +89,11 @@ XBT_PUBLIC(void) xbt_dict_remove_ext(xbt_dict_t dict, const char *key,
                                      int key_len);
 
 
+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);
+
+
 /** @} */
 /** @defgroup XBT_dict_curs Cursors on dictionaries
  *  @ingroup XBT_dict
@@ -132,7 +136,7 @@ XBT_PUBLIC(int) xbt_dict_cursor_get_or_free(xbt_dict_cursor_t * cursor,
       @hideinitializer */
 #  define xbt_dict_foreach(dict,cursor,key,data)                       \
     for (cursor=NULL, xbt_dict_cursor_first((dict),&(cursor)) ;        \
-         xbt_dict_cursor_get_or_free(&(cursor),&(key),(void**)(&data));\
+         xbt_dict_cursor_get_or_free(&(cursor),(char**)&(key),(void**)(&data));\
          xbt_dict_cursor_step(cursor) )
 
 /** @} */