Changeset 85c3004 for protocols/twitter


Ignore:
Timestamp:
2015-01-16T19:50:24Z (10 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
434ffa2
Parents:
4f161e3
Message:

twitter: minor cleanup, use G_G(U)INT64_FORMAT instead of casting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter_lib.c

    r4f161e3 r85c3004  
    234234void twitter_get_friends_ids(struct im_connection *ic, gint64 next_cursor)
    235235{
    236         // Primitive, but hey! It works...     
     236        // Primitive, but hey! It works...
    237237        char *args[2];
    238238        args[0] = "cursor";
    239         args[1] = g_strdup_printf("%lld", (long long) next_cursor);
     239        args[1] = g_strdup_printf("%" G_GINT64_FORMAT, next_cursor);
    240240        twitter_http(ic, TWITTER_FRIENDS_IDS_URL, twitter_http_get_friends_ids, ic, 0, args, 2);
    241241
     
    10021002        char *args[6];
    10031003        args[0] = "cursor";
    1004         args[1] = g_strdup_printf("%lld", (long long) next_cursor);
     1004        args[1] = g_strdup_printf("%" G_GINT64_FORMAT, next_cursor);
    10051005        args[2] = "include_entities";
    10061006        args[3] = "true";
     
    10381038        char *args[6];
    10391039        args[0] = "cursor";
    1040         args[1] = g_strdup_printf("%lld", (long long) next_cursor);
     1040        args[1] = g_strdup_printf("%" G_GINT64_FORMAT, next_cursor);
    10411041        args[2] = "include_entities";
    10421042        args[3] = "true";
    10431043        if (td->timeline_id) {
    10441044                args[4] = "since_id";
    1045                 args[5] = g_strdup_printf("%llu", (long long unsigned int) td->timeline_id);
     1045                args[5] = g_strdup_printf("%" G_GUINT64_FORMAT, td->timeline_id);
    10461046        } else {
    10471047                args[4] = "count";
     
    11721172                "status", msg,
    11731173                "in_reply_to_status_id",
    1174                 g_strdup_printf("%llu", (unsigned long long) in_reply_to)
     1174                g_strdup_printf("%" G_GUINT64_FORMAT, in_reply_to)
    11751175        };
    11761176        twitter_http(ic, TWITTER_STATUS_UPDATE_URL, twitter_http_post, ic, 1,
     
    12061206{
    12071207        char *url;
    1208         url = g_strdup_printf("%s%llu%s", TWITTER_STATUS_DESTROY_URL,
    1209                               (unsigned long long) id, ".json");
     1208        url = g_strdup_printf("%s%" G_GUINT64_FORMAT "%s",
     1209                              TWITTER_STATUS_DESTROY_URL, id, ".json");
    12101210        twitter_http_f(ic, url, twitter_http_post, ic, 1, NULL, 0,
    12111211                       TWITTER_HTTP_USER_ACK);
     
    12161216{
    12171217        char *url;
    1218         url = g_strdup_printf("%s%llu%s", TWITTER_STATUS_RETWEET_URL,
    1219                               (unsigned long long) id, ".json");
     1218        url = g_strdup_printf("%s%" G_GUINT64_FORMAT "%s",
     1219                              TWITTER_STATUS_RETWEET_URL, id, ".json");
    12201220        twitter_http_f(ic, url, twitter_http_post, ic, 1, NULL, 0,
    12211221                       TWITTER_HTTP_USER_ACK);
     
    12461246                NULL,
    12471247        };
    1248         args[1] = g_strdup_printf("%llu", (unsigned long long) id);
     1248        args[1] = g_strdup_printf("%" G_GUINT64_FORMAT, id);
    12491249        twitter_http_f(ic, TWITTER_FAVORITE_CREATE_URL, twitter_http_post,
    12501250                       ic, 1, args, 2, TWITTER_HTTP_USER_ACK);
Note: See TracChangeset for help on using the changeset viewer.