瀏覽代碼

r17935@catbus: nickm | 2008-02-05 20:54:54 -0500
Add typechecking cast functions for typed digestmap variants.


svn:r13396

Nick Mathewson 16 年之前
父節點
當前提交
8366da01fb
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/common/container.h

+ 4 - 0
src/common/container.h

@@ -260,6 +260,10 @@ void* strmap_remove_lc(strmap_t *map, const char *key);
   {                                                                     \
     return (maptype*)digestmap_new();                                   \
   }                                                                     \
+  static INLINE digestmap_t* prefix##to_digestmap(maptype *map)         \
+  {                                                                     \
+    return (digestmap_t*)map;                                           \
+  }                                                                     \
   static INLINE valtype* prefix##get(maptype *map, const char *key)     \
   {                                                                     \
     return (valtype*)digestmap_get((digestmap_t*)map, key);             \