Index: dh-link.c =================================================================== --- dh-link.c (revision 973) +++ dh-link.c (working copy) @@ -20,10 +20,21 @@ */ #include -#include "string.h" +#include +#include #include "dh-link.h" -static void link_free (DhLink *link); +GType +dh_link_get_type (void) +{ + static GType type = 0; + if (G_UNLIKELY (type == 0)) { + type = g_boxed_type_register_static ("DhLink", + (GBoxedCopyFunc)dh_link_ref, + (GBoxedFreeFunc)dh_link_unref); + } + return type; +} static void link_free (DhLink *link) Index: dh-link.h =================================================================== --- dh-link.h (revision 973) +++ dh-link.h (working copy) @@ -23,6 +23,7 @@ #define __DH_LINK_H__ #include +#include typedef struct _DhLink DhLink; @@ -49,6 +50,10 @@ guint ref_count; }; +#define DH_TYPE_LINK dh_link_get_type () + +GType dh_link_get_type (void); + DhLink * dh_link_new (DhLinkType type, const gchar *name, const gchar *book,