[gnome-photos] dlna: Use G_STMT_START/G_STMT_END/G_STRFUNC



commit 117ee07f591acf0e1ff76627e728c56994c4252d
Author: Emanuele Aina <emanuele aina collabora com>
Date:   Wed Aug 21 10:25:20 2013 +0200

    dlna: Use G_STMT_START/G_STMT_END/G_STRFUNC
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706513

 src/photos-dlna-renderer.c          |    8 ++++----
 src/photos-dlna-renderers-manager.c |    6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/photos-dlna-renderer.c b/src/photos-dlna-renderer.c
index 5eca480..a5505f3 100644
--- a/src/photos-dlna-renderer.c
+++ b/src/photos-dlna-renderer.c
@@ -60,15 +60,15 @@ G_DEFINE_TYPE_WITH_CODE (PhotosDlnaRenderer, photos_dlna_renderer, G_TYPE_OBJECT
                          G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, 
photos_dlna_renderer_async_initable_iface_init));
 
 #define RETURN_ON_ERROR(task, error, msg) \
-  do { \
+  G_STMT_START { \
     if (error != NULL) \
       { \
-        g_debug ("%s: %s: %s", __func__, msg, error->message); \
+        g_debug ("%s: %s: %s", G_STRFUNC, msg, error->message); \
         g_task_return_error (task, error); \
         g_object_unref (task); \
         return; \
       } \
-  } while (0)
+  } G_STMT_END
 
 static void
 photos_dlna_renderer_dispose (GObject *object)
@@ -418,7 +418,7 @@ photos_dlna_renderer_share_host_file_cb (GObject      *source_object,
   g_object_notify (G_OBJECT (self), "shared-count");
 
   /* 2) Mpris.Player.OpenUri(hosted_url) */
-  g_debug ("%s %s", __func__, hosted_url);
+  g_debug ("%s %s", G_STRFUNC, hosted_url);
   mpris_player_call_open_uri (priv->player, hosted_url,
                               g_task_get_cancellable (task),
                               photos_dlna_renderer_share_open_uri_cb,
diff --git a/src/photos-dlna-renderers-manager.c b/src/photos-dlna-renderers-manager.c
index 3bfca1b..90620fc 100644
--- a/src/photos-dlna-renderers-manager.c
+++ b/src/photos-dlna-renderers-manager.c
@@ -80,7 +80,7 @@ photos_dlna_renderers_manager_renderer_new_cb (GObject      *source_object,
     }
 
   object_path = photos_dlna_renderer_get_object_path (renderer);
-  g_debug ("%s '%s' %s %s", __func__,
+  g_debug ("%s '%s' %s %s", G_STRFUNC,
            photos_dlna_renderer_get_friendly_name (renderer),
            photos_dlna_renderer_get_udn (renderer),
            object_path);
@@ -114,7 +114,7 @@ photos_dlna_renderers_manager_renderer_lost_cb (PhotosDlnaRenderersManager *self
   g_return_if_fail (renderer != NULL);
 
   g_hash_table_steal (priv->renderers, object_path);
-  g_debug ("%s '%s' %s %s", __func__,
+  g_debug ("%s '%s' %s %s", G_STRFUNC,
            photos_dlna_renderer_get_friendly_name (renderer),
            photos_dlna_renderer_get_udn (renderer),
            object_path);
@@ -163,7 +163,7 @@ photos_dlna_renderers_manager_proxy_new_cb (GObject      *source_object,
       return;
     }
 
-  g_debug ("%s DLNA renderers manager initialized", __func__);
+  g_debug ("%s DLNA renderers manager initialized", G_STRFUNC);
 
   g_signal_connect_swapped (priv->proxy, "found-renderer",
                             G_CALLBACK (photos_dlna_renderers_manager_renderer_found_cb), self);


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