devhelp r974 - in trunk: . src
- From: rburton svn gnome org
- To: svn-commits-list gnome org
- Subject: devhelp r974 - in trunk: . src
- Date: Thu, 21 Feb 2008 19:25:12 +0000 (GMT)
Author: rburton
Date: Thu Feb 21 19:25:12 2008
New Revision: 974
URL: http://svn.gnome.org/viewvc/devhelp?rev=974&view=rev
Log:
2008-02-21 Ross Burton <ross burtonini com>
* src/dh-link.c:
* src/dh-link.h:
Add a GType for the DhLink boxed type.
Modified:
trunk/ChangeLog
trunk/src/dh-link.c
trunk/src/dh-link.h
Modified: trunk/src/dh-link.c
==============================================================================
--- trunk/src/dh-link.c (original)
+++ trunk/src/dh-link.c Thu Feb 21 19:25:12 2008
@@ -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)
Modified: trunk/src/dh-link.h
==============================================================================
--- trunk/src/dh-link.h (original)
+++ trunk/src/dh-link.h Thu Feb 21 19:25:12 2008
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]