diff options
author | Christian Persch <chpe@src.gnome.org> | 2003-09-02 07:20:17 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-09-02 07:20:17 +0800 |
commit | 73a95385f4034998cc78199dc8bb9ee22d90d6aa (patch) | |
tree | 499d78ab52e8937f672e3659105dda083a34c988 /lib/ephy-node-db.c | |
parent | 3375c1878c4c0ebf4f5067d128024ea484208f62 (diff) | |
download | gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.gz gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.bz2 gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.lz gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.xz gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.zst gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.zip |
Mega-patch, changelog too long to paste here.
Diffstat (limited to 'lib/ephy-node-db.c')
-rw-r--r-- | lib/ephy-node-db.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/ephy-node-db.c b/lib/ephy-node-db.c index 86913d93c..c6d084bed 100644 --- a/lib/ephy-node-db.c +++ b/lib/ephy-node-db.c @@ -33,6 +33,8 @@ enum PROP_NAME }; +#define EPHY_NODE_DB_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_NODE_DB, EphyNodeDbPrivate)) + struct EphyNodeDbPrivate { char *name; @@ -142,12 +144,14 @@ ephy_node_db_class_init (EphyNodeDbClass *klass) "Name", NULL, G_PARAM_READWRITE)); + + g_type_class_add_private (object_class, sizeof (EphyNodeDbPrivate)); } static void ephy_node_db_init (EphyNodeDb *db) { - db->priv = g_new0 (EphyNodeDbPrivate, 1); + db->priv = EPHY_NODE_DB_GET_PRIVATE (db); db->priv->name = NULL; @@ -165,13 +169,7 @@ ephy_node_db_init (EphyNodeDb *db) static void ephy_node_db_finalize (GObject *object) { - EphyNodeDb *db; - - g_return_if_fail (object != NULL); - - db = EPHY_NODE_DB (object); - - g_return_if_fail (db->priv != NULL); + EphyNodeDb *db = EPHY_NODE_DB (object); g_hash_table_remove (ephy_node_databases, db->priv->name); if (g_hash_table_size (ephy_node_databases) == 0) @@ -187,8 +185,6 @@ ephy_node_db_finalize (GObject *object) g_free (db->priv->name); - g_free (db->priv); - G_OBJECT_CLASS (parent_class)->finalize (object); } |