[libgdata] [core] Remove more shadowing of functions from unistd.h



commit eec6379527f50f7356dc7f51e5616470ba870685
Author: Philip Withnall <philip tecnocode co uk>
Date:   Wed Jun 16 16:11:11 2010 +0100

    [core] Remove more shadowing of functions from unistd.h

 gdata/gdata-access-handler.c                       |   32 ++++++++++----------
 gdata/gdata-entry.c                                |   16 +++++-----
 gdata/gdata-feed.c                                 |    8 ++--
 gdata/gdata-service.c                              |   32 ++++++++++----------
 gdata/services/contacts/gdata-contacts-contact.c   |   16 +++++-----
 gdata/services/contacts/gdata-contacts-service.c   |    8 ++--
 gdata/services/picasaweb/gdata-picasaweb-service.c |    6 ++--
 7 files changed, 59 insertions(+), 59 deletions(-)
---
diff --git a/gdata/gdata-access-handler.c b/gdata/gdata-access-handler.c
index e6b0c03..97b5941 100644
--- a/gdata/gdata-access-handler.c
+++ b/gdata/gdata-access-handler.c
@@ -85,7 +85,7 @@ gdata_access_handler_get_rules (GDataAccessHandler *self, GDataService *service,
                                 GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error)
 {
 	GDataFeed *feed;
-	GDataLink *link;
+	GDataLink *_link;
 	SoupMessage *message;
 	guint status;
 
@@ -97,9 +97,9 @@ gdata_access_handler_get_rules (GDataAccessHandler *self, GDataService *service,
 
 	/* Get the ACL URI */
 	/* TODO: ETag support */
-	link = gdata_entry_look_up_link (GDATA_ENTRY (self), "http://schemas.google.com/acl/2007#accessControlList";);
-	g_assert (link != NULL);
-	message = _gdata_service_build_message (service, SOUP_METHOD_GET, gdata_link_get_uri (link), NULL, FALSE);
+	_link = gdata_entry_look_up_link (GDATA_ENTRY (self), "http://schemas.google.com/acl/2007#accessControlList";);
+	g_assert (_link != NULL);
+	message = _gdata_service_build_message (service, SOUP_METHOD_GET, gdata_link_get_uri (_link), NULL, FALSE);
 
 	/* Send the message */
 	status = _gdata_service_send_message (service, message, cancellable, error);
@@ -154,7 +154,7 @@ GDataAccessRule *
 gdata_access_handler_insert_rule (GDataAccessHandler *self, GDataService *service, GDataAccessRule *rule, GCancellable *cancellable, GError **error)
 {
 	GDataAccessRule *updated_rule;
-	GDataLink *link;
+	GDataLink *_link;
 	SoupMessage *message;
 	gchar *upload_data;
 	guint status;
@@ -173,9 +173,9 @@ gdata_access_handler_insert_rule (GDataAccessHandler *self, GDataService *servic
 
 	/* Get the ACL URI */
 	/* TODO: ETag support */
-	link = gdata_entry_look_up_link (GDATA_ENTRY (self), "http://schemas.google.com/acl/2007#accessControlList";);
-	g_assert (link != NULL);
-	message = _gdata_service_build_message (service, SOUP_METHOD_POST, gdata_link_get_uri (link), NULL, FALSE);
+	_link = gdata_entry_look_up_link (GDATA_ENTRY (self), "http://schemas.google.com/acl/2007#accessControlList";);
+	g_assert (_link != NULL);
+	message = _gdata_service_build_message (service, SOUP_METHOD_POST, gdata_link_get_uri (_link), NULL, FALSE);
 
 	/* Append the data */
 	upload_data = gdata_parsable_get_xml (GDATA_PARSABLE (rule));
@@ -210,24 +210,24 @@ gdata_access_handler_insert_rule (GDataAccessHandler *self, GDataService *servic
 static SoupMessage *
 build_message (GDataAccessHandler *access_handler, GDataService *service, GDataAccessRule *rule, const gchar *method)
 {
-	GDataLink *link;
+	GDataLink *_link;
 	SoupMessage *message;
 	GString *uri_string;
 	gchar *uri;
 	const gchar *scope_type, *scope_value;
 
 	/* Get the edit URI */
-	link = gdata_entry_look_up_link (GDATA_ENTRY (rule), GDATA_LINK_EDIT);
-	if (link != NULL)
-		return _gdata_service_build_message (service, method, gdata_link_get_uri (link), NULL, FALSE);
+	_link = gdata_entry_look_up_link (GDATA_ENTRY (rule), GDATA_LINK_EDIT);
+	if (_link != NULL)
+		return _gdata_service_build_message (service, method, gdata_link_get_uri (_link), NULL, FALSE);
 
 	/* Try building the URI instead */
-	link = gdata_entry_look_up_link (GDATA_ENTRY (access_handler), "http://schemas.google.com/acl/2007#accessControlList";);
-	g_assert (link != NULL);
+	_link = gdata_entry_look_up_link (GDATA_ENTRY (access_handler), "http://schemas.google.com/acl/2007#accessControlList";);
+	g_assert (_link != NULL);
 	gdata_access_rule_get_scope (rule, &scope_type, &scope_value);
 
-	uri_string = g_string_sized_new (strlen (gdata_link_get_uri (link)) + 30);
-	g_string_append_printf (uri_string, "%s/", gdata_link_get_uri (link));
+	uri_string = g_string_sized_new (strlen (gdata_link_get_uri (_link)) + 30);
+	g_string_append_printf (uri_string, "%s/", gdata_link_get_uri (_link));
 	g_string_append_uri_escaped (uri_string, scope_type, NULL, FALSE);
 	if (scope_value != NULL) {
 		g_string_append (uri_string, "%3A");
diff --git a/gdata/gdata-entry.c b/gdata/gdata-entry.c
index 2f29d0c..d2c1e6a 100644
--- a/gdata/gdata-entry.c
+++ b/gdata/gdata-entry.c
@@ -756,27 +756,27 @@ gdata_entry_set_content (GDataEntry *self, const gchar *content)
 /**
  * gdata_entry_add_link:
  * @self: a #GDataEntry
- * @link: a #GDataLink to add
+ * @_link: a #GDataLink to add
  *
- * Adds @link to the list of links in the given #GDataEntry and increments its reference count.
+ * Adds @_link to the list of links in the given #GDataEntry and increments its reference count.
  *
  * Duplicate links will not be added to the list.
  **/
 void
-gdata_entry_add_link (GDataEntry *self, GDataLink *link)
+gdata_entry_add_link (GDataEntry *self, GDataLink *_link)
 {
 	/* TODO: More link API */
 	g_return_if_fail (GDATA_IS_ENTRY (self));
-	g_return_if_fail (GDATA_IS_LINK (link));
+	g_return_if_fail (GDATA_IS_LINK (_link));
 
-	if (g_list_find_custom (self->priv->links, link, (GCompareFunc) gdata_comparable_compare) == NULL)
-		self->priv->links = g_list_prepend (self->priv->links, g_object_ref (link));
+	if (g_list_find_custom (self->priv->links, _link, (GCompareFunc) gdata_comparable_compare) == NULL)
+		self->priv->links = g_list_prepend (self->priv->links, g_object_ref (_link));
 }
 
 static gint
-link_compare_cb (const GDataLink *link, const gchar *rel)
+link_compare_cb (const GDataLink *_link, const gchar *rel)
 {
-	return strcmp (gdata_link_get_relation_type ((GDataLink*) link), rel);
+	return strcmp (gdata_link_get_relation_type ((GDataLink*) _link), rel);
 }
 
 /**
diff --git a/gdata/gdata-feed.c b/gdata/gdata-feed.c
index 8d6294a..bf1e154 100644
--- a/gdata/gdata-feed.c
+++ b/gdata/gdata-feed.c
@@ -643,9 +643,9 @@ gdata_feed_get_links (GDataFeed *self)
 }
 
 static gint
-link_compare_cb (const GDataLink *link, const gchar *rel)
+link_compare_cb (const GDataLink *_link, const gchar *rel)
 {
-	return strcmp (gdata_link_get_relation_type ((GDataLink*) link), rel);
+	return strcmp (gdata_link_get_relation_type ((GDataLink*) _link), rel);
 }
 
 /**
@@ -674,9 +674,9 @@ gdata_feed_look_up_link (GDataFeed *self, const gchar *rel)
 }
 
 static void
-_gdata_feed_add_link (GDataFeed *self, GDataLink *link)
+_gdata_feed_add_link (GDataFeed *self, GDataLink *_link)
 {
-	self->priv->links = g_list_prepend (self->priv->links, g_object_ref (link));
+	self->priv->links = g_list_prepend (self->priv->links, g_object_ref (_link));
 }
 
 /**
diff --git a/gdata/gdata-service.c b/gdata/gdata-service.c
index 50fb651..07676aa 100644
--- a/gdata/gdata-service.c
+++ b/gdata/gdata-service.c
@@ -1228,14 +1228,14 @@ gdata_service_query (GDataService *self, const gchar *feed_uri, GDataQuery *quer
 
 	/* Update the query with the next and previous URIs from the feed */
 	if (query != NULL && feed != NULL) {
-		GDataLink *link;
-
-		link = gdata_feed_look_up_link (feed, "next");
-		if (link != NULL)
-			_gdata_query_set_next_uri (query, gdata_link_get_uri (link));
-		link = gdata_feed_look_up_link (feed, "previous");
-		if (link != NULL)
-			_gdata_query_set_previous_uri (query, gdata_link_get_uri (link));
+		GDataLink *_link;
+
+		_link = gdata_feed_look_up_link (feed, "next");
+		if (_link != NULL)
+			_gdata_query_set_next_uri (query, gdata_link_get_uri (_link));
+		_link = gdata_feed_look_up_link (feed, "previous");
+		if (_link != NULL)
+			_gdata_query_set_previous_uri (query, gdata_link_get_uri (_link));
 	}
 
 	return feed;
@@ -1709,7 +1709,7 @@ GDataEntry *
 gdata_service_update_entry (GDataService *self, GDataEntry *entry, GCancellable *cancellable, GError **error)
 {
 	GDataEntry *updated_entry;
-	GDataLink *link;
+	GDataLink *_link;
 	SoupMessage *message;
 	gchar *upload_data;
 	guint status;
@@ -1720,9 +1720,9 @@ gdata_service_update_entry (GDataService *self, GDataEntry *entry, GCancellable
 	g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
 
 	/* Get the edit URI */
-	link = gdata_entry_look_up_link (entry, GDATA_LINK_EDIT);
-	g_assert (link != NULL);
-	message = _gdata_service_build_message (self, SOUP_METHOD_PUT, gdata_link_get_uri (link), gdata_entry_get_etag (entry), TRUE);
+	_link = gdata_entry_look_up_link (entry, GDATA_LINK_EDIT);
+	g_assert (_link != NULL);
+	message = _gdata_service_build_message (self, SOUP_METHOD_PUT, gdata_link_get_uri (_link), gdata_entry_get_etag (entry), TRUE);
 
 	/* Append the data */
 	upload_data = gdata_parsable_get_xml (GDATA_PARSABLE (entry));
@@ -1858,7 +1858,7 @@ gdata_service_delete_entry_finish (GDataService *self, GAsyncResult *async_resul
 gboolean
 gdata_service_delete_entry (GDataService *self, GDataEntry *entry, GCancellable *cancellable, GError **error)
 {
-	GDataLink *link;
+	GDataLink *_link;
 	SoupMessage *message;
 	guint status;
 
@@ -1868,9 +1868,9 @@ gdata_service_delete_entry (GDataService *self, GDataEntry *entry, GCancellable
 	g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
 
 	/* Get the edit URI */
-	link = gdata_entry_look_up_link (entry, GDATA_LINK_EDIT);
-	g_assert (link != NULL);
-	message = _gdata_service_build_message (self, SOUP_METHOD_DELETE, gdata_link_get_uri (link), gdata_entry_get_etag (entry), TRUE);
+	_link = gdata_entry_look_up_link (entry, GDATA_LINK_EDIT);
+	g_assert (_link != NULL);
+	message = _gdata_service_build_message (self, SOUP_METHOD_DELETE, gdata_link_get_uri (_link), gdata_entry_get_etag (entry), TRUE);
 
 	/* Send the message */
 	status = _gdata_service_send_message (self, message, cancellable, error);
diff --git a/gdata/services/contacts/gdata-contacts-contact.c b/gdata/services/contacts/gdata-contacts-contact.c
index 58e1c78..1b1a365 100644
--- a/gdata/services/contacts/gdata-contacts-contact.c
+++ b/gdata/services/contacts/gdata-contacts-contact.c
@@ -2870,7 +2870,7 @@ gchar *
 gdata_contacts_contact_get_photo (GDataContactsContact *self, GDataContactsService *service, gsize *length, gchar **content_type,
                                   GCancellable *cancellable, GError **error)
 {
-	GDataLink *link;
+	GDataLink *_link;
 	SoupMessage *message;
 	guint status;
 	gchar *data;
@@ -2888,9 +2888,9 @@ gdata_contacts_contact_get_photo (GDataContactsContact *self, GDataContactsServi
 
 	/* Get the photo URI */
 	/* TODO: ETag support */
-	link = gdata_entry_look_up_link (GDATA_ENTRY (self), "http://schemas.google.com/contacts/2008/rel#photo";);
-	g_assert (link != NULL);
-	message = _gdata_service_build_message (GDATA_SERVICE (service), SOUP_METHOD_GET, gdata_link_get_uri (link), NULL, FALSE);
+	_link = gdata_entry_look_up_link (GDATA_ENTRY (self), "http://schemas.google.com/contacts/2008/rel#photo";);
+	g_assert (_link != NULL);
+	message = _gdata_service_build_message (GDATA_SERVICE (service), SOUP_METHOD_GET, gdata_link_get_uri (_link), NULL, FALSE);
 
 	/* Send the message */
 	status = _gdata_service_send_message (GDATA_SERVICE (service), message, cancellable, error);
@@ -2949,7 +2949,7 @@ gboolean
 gdata_contacts_contact_set_photo (GDataContactsContact *self, GDataService *service, const gchar *data, gsize length,
                                   GCancellable *cancellable, GError **error)
 {
-	GDataLink *link;
+	GDataLink *_link;
 	SoupMessage *message;
 	guint status;
 	gboolean adding_photo = FALSE, deleting_photo = FALSE;
@@ -2966,10 +2966,10 @@ gdata_contacts_contact_set_photo (GDataContactsContact *self, GDataService *serv
 		deleting_photo = TRUE;
 
 	/* Get the photo URI */
-	link = gdata_entry_look_up_link (GDATA_ENTRY (self), "http://schemas.google.com/contacts/2008/rel#photo";);
-	g_assert (link != NULL);
+	_link = gdata_entry_look_up_link (GDATA_ENTRY (self), "http://schemas.google.com/contacts/2008/rel#photo";);
+	g_assert (_link != NULL);
 	message = _gdata_service_build_message (GDATA_SERVICE (service), (deleting_photo == TRUE) ? SOUP_METHOD_DELETE : SOUP_METHOD_PUT,
-	                                        gdata_link_get_uri (link), self->priv->photo_etag, TRUE);
+	                                        gdata_link_get_uri (_link), self->priv->photo_etag, TRUE);
 
 	/* Append the data */
 	if (deleting_photo == FALSE)
diff --git a/gdata/services/contacts/gdata-contacts-service.c b/gdata/services/contacts/gdata-contacts-service.c
index 442fa67..ef3cfc8 100644
--- a/gdata/services/contacts/gdata-contacts-service.c
+++ b/gdata/services/contacts/gdata-contacts-service.c
@@ -223,7 +223,7 @@ gdata_contacts_service_update_contact (GDataContactsService *self, GDataContacts
 {
 	/* TODO: Async variant */
 	const gchar *uri;
-	GDataLink *link;
+	GDataLink *_link;
 
 	g_return_val_if_fail (GDATA_IS_CONTACTS_SERVICE (self), NULL);
 	g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (contact), NULL);
@@ -232,9 +232,9 @@ gdata_contacts_service_update_contact (GDataContactsService *self, GDataContacts
 
 	/* Can't trust the edit URI the contact gives us, as it has the wrong projection; it uses the base projection, which
 	 * doesn't allow for extended attributes to be set (for some weird reason). */
-	link = gdata_entry_look_up_link (GDATA_ENTRY (contact), GDATA_LINK_EDIT);
-	g_assert (link != NULL);
-	uri = gdata_link_get_uri (link);
+	_link = gdata_entry_look_up_link (GDATA_ENTRY (contact), GDATA_LINK_EDIT);
+	g_assert (_link != NULL);
+	uri = gdata_link_get_uri (_link);
 	g_assert (uri != NULL);
 	uri = strstr (uri, "/base/");
 	if (uri != NULL)
diff --git a/gdata/services/picasaweb/gdata-picasaweb-service.c b/gdata/services/picasaweb/gdata-picasaweb-service.c
index 01bdd5c..3782e3c 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-service.c
+++ b/gdata/services/picasaweb/gdata-picasaweb-service.c
@@ -343,14 +343,14 @@ gdata_picasaweb_service_query_files (GDataPicasaWebService *self, GDataPicasaWeb
 	g_return_val_if_fail (error == NULL || *error == NULL, NULL);
 
 	if (album != NULL) {
-		GDataLink *link = gdata_entry_look_up_link (GDATA_ENTRY (album), "http://schemas.google.com/g/2005#feed";);
-		if (link == NULL) {
+		GDataLink *_link = gdata_entry_look_up_link (GDATA_ENTRY (album), "http://schemas.google.com/g/2005#feed";);
+		if (_link == NULL) {
 			/* Error */
 			g_set_error_literal (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
 			                     _("The album did not have a feed link."));
 			return NULL;
 		}
-		uri = gdata_link_get_uri (link);
+		uri = gdata_link_get_uri (_link);
 	} else {
 		/* Default URI */
 		uri = "http://picasaweb.google.com/data/feed/api/user/default/albumid/default";;



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