Fixed accounts.pxd recursive call from other .pxd files.
[python-purple] / buddy.pyx
index fa3be79..d12fd58 100644 (file)
--- a/buddy.pyx
+++ b/buddy.pyx
 #  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+cimport purple
+
 cdef class Buddy:
     """ Buddy class """
-    cdef PurpleBuddy *__buddy
+    cdef blist.PurpleBuddy *__buddy
 
-    def __cinit__(self):
+    def __init__(self):
         self.__buddy = NULL
 
-    def new_buddy(self, acc, const_char_ptr scr, const_char_ptr alias):
-        self.__buddy = c_purple_buddy_new(<PurpleAccount *>acc.__account, scr, alias)
+    def new_buddy(self, acc, char *scr, char *alias):
+        self.__buddy = blist.c_purple_buddy_new(<account.PurpleAccount *>acc.__account, scr, alias)
 
     def get_alias(self):
-        return c_purple_buddy_get_alias_only(self.__buddy)
+        return blist.c_purple_buddy_get_alias_only(self.__buddy)
 
     def get_name(self):
-        return c_purple_buddy_get_name(self.__buddy)
+        return blist.c_purple_buddy_get_name(self.__buddy)