]> git.ozlabs.org Git - ccan/blobdiff - ccan/htable/htable_type.h
htable: HTABLE_INITIALIZER() for static initialization.
[ccan] / ccan / htable / htable_type.h
index 3b555cde4aaadd183d6e196ac50986d11fdc58d7..03cc46fc5836c8003e2c1e325c13a5ec6df5db47 100644 (file)
@@ -38,6 +38,9 @@
  *
  * It's currently safe to iterate over a changing hashtable, but you might
  * miss an element.  Iteration isn't very efficient, either.
+ *
+ * You can use HTABLE_INITIALIZER like so:
+ *     struct <name> ht = { HTABLE_INITIALIZER(ht.raw, <name>_hash, NULL) };
  */
 #define HTABLE_DEFINE_TYPE(type, keyof, hashfn, eqfn, name)            \
        struct name { struct htable raw; };                             \