]> git.ozlabs.org Git - ccan/blobdiff - ccan/container_of/_info.c
CRC module.
[ccan] / ccan / container_of / _info.c
index 96c12d88cdeb0d27f6ee30ab25c572810623c73d..4c25c296036d510a84f2df79c44736004e2200f7 100644 (file)
  * callback.
  *
  * Example:
- *     struct info
- *     {
+ *     #include <stdio.h>
+ *     #include <ccan/container_of/container_of.h>
+ *
+ *     struct timer {
+ *             void *members;
+ *     };
+ *
+ *     struct info {
  *             int my_stuff;
  *             struct timer timer;
  *     };
  *             struct info info = { .my_stuff = 1 };
  *
  *             register_timer(&info.timer);
- *             ...
+ *             // ...
+ *             return 0;
+ *     }
+ *
+ * Licence: LGPL (2 or any later version)
  */
 int main(int argc, char *argv[])
 {