[libsocialweb] plurk: Use G_GINT64_FORMAT for formatting the gint64s nicely



commit 4b3df63bedb1ec2ca11914403bec11fd800159e3
Author: Rob Bradford <rob linux intel com>
Date:   Fri Apr 29 17:57:26 2011 +0100

    plurk: Use G_GINT64_FORMAT for formatting the gint64s nicely

 services/plurk/plurk-item-view.c |    6 +++---
 services/plurk/plurk.c           |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/services/plurk/plurk-item-view.c b/services/plurk/plurk-item-view.c
index 3150f0d..e074909 100644
--- a/services/plurk/plurk-item-view.c
+++ b/services/plurk/plurk-item-view.c
@@ -230,7 +230,7 @@ construct_image_url (const char *uid,
   if (has_profile == 1 && avatar <= 0)
     url = g_strdup_printf ("http://avatars.plurk.com/%s-medium.gif";, uid);
   else if (has_profile == 1 && avatar > 0)
-    url = g_strdup_printf ("http://avatars.plurk.com/%s-medium%lld.gif";, uid, avatar);
+    url = g_strdup_printf ("http://avatars.plurk.com/%s-medium%"; G_GINT64_FORMAT ".gif", uid, avatar);
   else
     url = g_strdup_printf ("http://www.plurk.com/static/default_medium.gif";);
 
@@ -295,7 +295,7 @@ make_item (SwService *service, JsonNode *plurk_node, JsonNode *plurk_users)
 
   /* Get the user object */
   id = json_object_get_int_member (plurk, "owner_id");
-  uid = g_strdup_printf ("%lld", id);
+  uid = g_strdup_printf ("%"G_GINT64_FORMAT, id);
   object = json_node_get_object (plurk_users);
   node = json_object_get_member (object, uid);
   user = json_node_get_object (node);
@@ -308,7 +308,7 @@ make_item (SwService *service, JsonNode *plurk_node, JsonNode *plurk_users)
 
   /* Construct the id of sw_item */
   id = json_object_get_int_member (plurk, "plurk_id");
-  pid = g_strdup_printf ("%lld", id);
+  pid = g_strdup_printf ("%"G_GINT64_FORMAT, id);
   sw_item_take (item, "id", g_strconcat ("plurk-", pid, NULL));
 
   /* Get the display name of the user */
diff --git a/services/plurk/plurk.c b/services/plurk/plurk.c
index c91ef90..8735851 100644
--- a/services/plurk/plurk.c
+++ b/services/plurk/plurk.c
@@ -128,7 +128,7 @@ construct_image_url (const char *uid,
   if (has_profile == 1 && avatar <= 0)
     url = g_strdup_printf ("http://avatars.plurk.com/%s-medium.gif";, uid);
   else if (has_profile == 1 && avatar > 0)
-    url = g_strdup_printf ("http://avatars.plurk.com/%s-medium%lld.gif";, uid, avatar);
+    url = g_strdup_printf ("http://avatars.plurk.com/%s-medium%"; G_GINT64_FORMAT ".gif", uid, avatar);
   else
     url = g_strdup_printf ("http://www.plurk.com/static/default_medium.gif";);
 
@@ -219,7 +219,7 @@ construct_user_data (SwServicePlurk* plurk, JsonNode *root)
 
   has_profile = json_object_get_int_member (object, "has_profile_image");
 
-  uid = g_strdup_printf ("%lld", id);
+  uid = g_strdup_printf ("%"G_GINT64_FORMAT, id);
 
   priv->user_id = (char *) uid;
   priv->image_url = construct_image_url (uid, avatar, has_profile);



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