[evolution-couchdb] Use g_object_unref for CouchdbStructField's



commit ff5604ef3851d51e105ca10a0bf0802dd59ddb92
Author: Rodrigo Moya <rodrigo gnome-db org>
Date:   Wed Jun 9 10:55:21 2010 +0200

    Use g_object_unref for CouchdbStructField's

 addressbook/e-book-backend-couchdb.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/addressbook/e-book-backend-couchdb.c b/addressbook/e-book-backend-couchdb.c
index 7bc76ca..4cbc0c0 100644
--- a/addressbook/e-book-backend-couchdb.c
+++ b/addressbook/e-book-backend-couchdb.c
@@ -73,7 +73,7 @@ contact_from_couch_document (CouchdbDocument *document)
 			if (private_annotations != NULL) {
 				if (couchdb_struct_field_has_field (private_annotations, "deleted")
 				    && couchdb_struct_field_get_boolean_field (private_annotations, "deleted"))
-					couchdb_struct_field_unref (app_annotations);
+					g_object_unref (app_annotations);
 					return NULL;
 			}
 		}
@@ -159,7 +159,7 @@ contact_from_couch_document (CouchdbDocument *document)
 
 		/* remove address from list */
 		list = g_slist_remove (list, email_address);
-		couchdb_struct_field_unref (email_address);
+		g_object_unref (email_address);
 	}
 
 	if (attr_list) {
@@ -277,7 +277,7 @@ contact_from_couch_document (CouchdbDocument *document)
 
 		/* remove phones from list */
 		list = g_slist_remove (list, phone_number);
-		couchdb_struct_field_unref (phone_number);
+		g_object_unref (phone_number);
 	}
 
 	/* parse postal addresses */
@@ -308,7 +308,7 @@ contact_from_couch_document (CouchdbDocument *document)
 
 		/* remove addresses from list */
 		list = g_slist_remove (list, address);
-		couchdb_struct_field_unref (address);
+		g_object_unref (address);
 
 		e_contact_address_free (contact_address);
 	}
@@ -344,7 +344,7 @@ contact_from_couch_document (CouchdbDocument *document)
 
 		/* remove urls from list */
 		list = g_slist_remove (list, url);
-		couchdb_struct_field_unref (url);
+		g_object_unref (url);
 	}
 
 	/* parse IM addresses */
@@ -409,7 +409,7 @@ contact_from_couch_document (CouchdbDocument *document)
 
 		/* remove addresses from list */
 		list = g_slist_remove (list, im);
-		couchdb_struct_field_unref (im);
+		g_object_unref (im);
 	}
 
 	/* birth date */
@@ -463,7 +463,7 @@ contact_from_couch_document (CouchdbDocument *document)
 						  str);
 
 		g_free (str);
-		couchdb_struct_field_unref (app_annotations);
+		g_object_unref (app_annotations);
 	} else {
 		/* Always have a REV field on the VCARD, for SyncEvolution (bug LP:#479110) */
 		gchar time_string[100] = {0};
@@ -698,7 +698,7 @@ set_vcard_revision (CouchdbStructField *app_annotations, EContact *contact)
 	}
 
 	couchdb_struct_field_set_struct_field (app_annotations, "Evolution", evo_annotations);
-	couchdb_struct_field_unref (evo_annotations);
+	g_object_unref (evo_annotations);
 }
 
 static CouchdbDocument *
@@ -917,7 +917,7 @@ couch_document_from_contact (EBookBackendCouchDB *couchdb_backend, EContact *con
 
 	set_vcard_revision (app_annotations, contact);
 	desktopcouch_document_set_application_annotations (DESKTOPCOUCH_DOCUMENT (document), app_annotations);
-	couchdb_struct_field_unref (app_annotations);
+	g_object_unref (app_annotations);
 
 	return COUCHDB_DOCUMENT (document);
 }
@@ -1197,9 +1197,9 @@ e_book_backend_couchdb_remove_contacts (EBookBackend *backend,
 				}
 
 				/* Free memory */
-				couchdb_struct_field_unref (app_annotations);
-				couchdb_struct_field_unref (u1_annotations);
-				couchdb_struct_field_unref (private_annotations);
+				g_object_unref (app_annotations);
+				g_object_unref (u1_annotations);
+				g_object_unref (private_annotations);
 			} else {
 				if (couchdb_database_delete_document (couchdb_backend->database, document, &error)) {
 					deleted_ids = g_list_append (deleted_ids, (gpointer) uid);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]