]> granicus.if.org Git - yasm/commitdiff
Fix build with recent Cython.
authorPeter Johnson <peter@tortall.net>
Sat, 25 Jun 2011 21:58:27 +0000 (14:58 -0700)
committerPeter Johnson <peter@tortall.net>
Sat, 25 Jun 2011 21:58:27 +0000 (14:58 -0700)
[#216 state:resolved]

tools/python-yasm/yasm.pyx

index f9c6ee4d6d80d21a866e716322f04fb30b5b3586..adbc734ecef388325f00d7696224bd3235923bba 100644 (file)
@@ -97,7 +97,7 @@ cdef void *__get_voidp(object obj, object forclass) except NULL:
 #
 cdef class __assoc_data_callback:
     cdef yasm_assoc_data_callback *cb
-    def __new__(self, destroy, print_):
+    def __cinit__(self, destroy, print_):
         self.cb = <yasm_assoc_data_callback *>malloc(sizeof(yasm_assoc_data_callback))
         self.cb.destroy = <void (*) (void *)>PyCObject_AsVoidPtr(destroy)
         #self.cb.print_ = <void (*) (void *, FILE *, int)>PyCObject_AsVoidPtr(print_)
@@ -107,7 +107,7 @@ cdef class __assoc_data_callback:
 
 cdef class Register:
     cdef unsigned long reg
-    def __new__(self, reg):
+    def __cinit__(self, reg):
         self.reg = reg
 
 include "errwarn.pxi"