[or-cvs] r13396: Add typechecking cast functions for typed digestmap variants (in tor/trunk: . src/common)

nickm at seul.org nickm at seul.org
Wed Feb 6 05:31:15 UTC 2008


Author: nickm
Date: 2008-02-06 00:31:15 -0500 (Wed, 06 Feb 2008)
New Revision: 13396

Modified:
   tor/trunk/
   tor/trunk/src/common/container.h
Log:
 r17935 at catbus:  nickm | 2008-02-05 20:54:54 -0500
 Add typechecking cast functions for typed digestmap variants.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r17935] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/common/container.h
===================================================================
--- tor/trunk/src/common/container.h	2008-02-06 00:54:47 UTC (rev 13395)
+++ tor/trunk/src/common/container.h	2008-02-06 05:31:15 UTC (rev 13396)
@@ -260,6 +260,10 @@
   {                                                                     \
     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);             \



More information about the tor-commits mailing list