Fix compilation error using python2.7 master
authorAdrian Zgorzalek <a.zgorzalek@gmail.com>
Tue, 2 Aug 2011 13:20:39 +0000 (09:20 -0400)
committerAnderson Briglia <anderson.briglia@openbossa.org>
Tue, 2 Aug 2011 13:32:26 +0000 (09:32 -0400)
Fix compilation error in account.pyx.

Signed-off-by: Adrian Zgorzalek <a.zgorzalek@gmail.com>

account.pyx

index a33df6c..81d6ab9 100644 (file)
@@ -622,11 +622,12 @@ cdef class Account:
     def set_active_status(self, type, msg=None):
         cdef status.PurpleStatusType *c_statustype = NULL
         cdef savedstatuses.PurpleSavedStatus *c_savedstatus = NULL
     def set_active_status(self, type, msg=None):
         cdef status.PurpleStatusType *c_statustype = NULL
         cdef savedstatuses.PurpleSavedStatus *c_savedstatus = NULL
+        cdef char* msg_literal = "message"
 
         if self.__exists:
             if msg:
                 account.purple_account_set_status(self._get_structure(),
 
         if self.__exists:
             if msg:
                 account.purple_account_set_status(self._get_structure(),
-                        <char *> type, True, "message", <char *> msg, NULL)
+                        <char *> type, True, msg_literal, <char *> msg, NULL)
             else:
                 account.purple_account_set_status(self._get_structure(),
                         <char *> type, True, NULL)
             else:
                 account.purple_account_set_status(self._get_structure(),
                         <char *> type, True, NULL)