Better documenting EINA_MAGIC_SET()'s use.
authorglima <glima@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 2 Aug 2010 16:57:38 +0000 (16:57 +0000)
committerglima <glima@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 2 Aug 2010 16:57:38 +0000 (16:57 +0000)
Patch by Jonas Gastal.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@50744 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/eina_magic.c

index 8de668d..be10303 100644 (file)
@@ -255,6 +255,12 @@ eina_magic_string_shutdown(void)
  *    free(ptr->name);
  *    free(ptr);
  * }
+ * struct base *base_new(int id, const char *name) {
+ *    struct base *ptr = malloc(sizeof(struct base));
+ *    EINA_MAGIC_SET(ptr, BASE_MAGIC);
+ *    ptr->id = id;
+ *    ptr->name = strdup(name);
+ * }
  *
  * struct subtype {
  *    struct base base;