Fix compilation error using python2.7
[python-purple] / conversation_cbs.pxd
index 573ef15..891a785 100644 (file)
@@ -17,8 +17,6 @@
 #  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-cimport purple
-
 cdef extern from *:
     ctypedef char const_char "const char"
     ctypedef glib.guchar const_guchar "const guchar"
@@ -106,7 +104,7 @@ cdef void write_im(conversation.PurpleConversation *conv, const_char *who, \
         message = None
 
     # FIXME: Maybe we need add more purple flags in the future
-    if flags & conversation.PURPLE_MESSAGE_SEND:
+    if (<int>flags & conversation.PURPLE_MESSAGE_SEND):
         flag = "SEND"
     else:
         flag = "RECV"