[empathy: 15/19] empathy-message: cast timestamps to glong



commit e3eb2f9d11ae3cc274c9d020dca0306fde07f783
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Tue Apr 19 10:49:42 2011 +0200

    empathy-message: cast timestamps to glong
    
    tp_message_get_received_timestamp() and tpl_event_get_timestamp() both return
    gint64 while the timestamp is stored as a glong. We need to cast it as varargs
    won't do it for us and not casting will result in a a sizing mismatch on
    32-bit.
    
    Ideally we should stop using time_t and always use gint64 with timestamps.

 libempathy/empathy-message.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c
index ad3a32c..883c5e7 100644
--- a/libempathy/empathy-message.c
+++ b/libempathy/empathy-message.c
@@ -324,7 +324,7 @@ empathy_message_from_tpl_log_event (TplEvent *logevent)
 		"type", tpl_text_event_get_message_type (TPL_TEXT_EVENT (logevent)),
 		"body", body,
 		"is-backlog", TRUE,
-		"timestamp", tpl_event_get_timestamp (logevent),
+		"timestamp", (glong) tpl_event_get_timestamp (logevent),
 		NULL);
 
 	if (receiver != NULL) {
@@ -632,7 +632,7 @@ empathy_message_new_from_tp_message (TpMessage *tp_msg,
 	message = g_object_new (EMPATHY_TYPE_MESSAGE,
 		"body", body,
 		"type", tp_message_get_message_type (tp_msg),
-		"timestamp", tp_message_get_received_timestamp (tp_msg),
+		"timestamp", (glong) tp_message_get_received_timestamp (tp_msg),
 		"flags", flags,
 		"is-backlog", flags & TP_CHANNEL_TEXT_MESSAGE_FLAG_SCROLLBACK,
 		"incoming", incoming,



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