All pastes #912964 Raw Edit

Anonymous

public diff v1 · immutable
·published 2008-02-21 19:17 UTC
rendered paste body
Index: dh-link.c===================================================================--- dh-link.c	(revision 973)+++ dh-link.c	(working copy)@@ -20,10 +20,21 @@  */  #include <config.h>-#include "string.h"+#include <string.h>+#include <glib-object.h> #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 <glib.h>+#include <glib-object.h>  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,