Adding function get_buddies()
[python-purple] / connection_cbs.pxd
index 463b17a..1fc35d6 100644 (file)
@@ -98,7 +98,7 @@ cdef void network_disconnected():
         (<object> connection_cbs["network-disconnected"])()
 
 cdef void report_disconnect_reason(connection.PurpleConnection *gc, \
-        connection.PurpleConnectionError reason, const_char *text):
+        connection.PurpleConnectionError reason, const_char *c_text):
     """
     Called when an error causes a connection to be disconnected. Called
     before disconnected. This op is intended to replace report_disconnect.
@@ -132,5 +132,10 @@ cdef void report_disconnect_reason(connection.PurpleConnection *gc, \
         15: 'Certificate error (other)',
         16: 'Other error' }[reason]
 
+    if c_text:
+        text = <char *> c_text
+    else:
+        text = None
+
     if connection_cbs.has_key("report-disconnect-reason"):
         (<object> connection_cbs["report-disconnect-reason"])(reason_string, <char *> text)