diff options
author | Peter Johnson <peter@tortall.net> | 2010-01-01 20:52:25 +0000 |
---|---|---|
committer | Peter Johnson <peter@tortall.net> | 2010-01-01 20:52:25 +0000 |
commit | 4df9f87323a12af47df42c6847ceaa1b9689eea0 (patch) | |
tree | a266035d2f33cc216f4656215a60647eb7dd6ae4 /tools | |
parent | b70e2373f75585edca75a1a3736cc049b9a9bdbb (diff) | |
download | yasm-4df9f87323a12af47df42c6847ceaa1b9689eea0.tar.gz |
All Pyrex files: Use __cinit__ instead of __new__ in extension classes.
svn path=/trunk/yasm/; revision=2254
Diffstat (limited to 'tools')
-rw-r--r-- | tools/python-yasm/bytecode.pxi | 2 | ||||
-rw-r--r-- | tools/python-yasm/expr.pxi | 2 | ||||
-rw-r--r-- | tools/python-yasm/floatnum.pxi | 2 | ||||
-rw-r--r-- | tools/python-yasm/intnum.pxi | 2 | ||||
-rw-r--r-- | tools/python-yasm/symrec.pxi | 10 | ||||
-rw-r--r-- | tools/python-yasm/value.pxi | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/tools/python-yasm/bytecode.pxi b/tools/python-yasm/bytecode.pxi index 193e3a6c..34aeaa57 100644 --- a/tools/python-yasm/bytecode.pxi +++ b/tools/python-yasm/bytecode.pxi @@ -28,7 +28,7 @@ cdef class Bytecode: cdef object __weakref__ # make weak-referenceable - def __new__(self, bc): + def __cinit__(self, bc): self.bc = NULL if PyCObject_Check(bc): self.bc = <yasm_bytecode *>__get_voidp(bc, Bytecode) diff --git a/tools/python-yasm/expr.pxi b/tools/python-yasm/expr.pxi index dea75d78..995a46ad 100644 --- a/tools/python-yasm/expr.pxi +++ b/tools/python-yasm/expr.pxi @@ -59,7 +59,7 @@ cdef object __make_expression(yasm_expr *expr): cdef class Expression: cdef yasm_expr *expr - def __new__(self, op, *args, **kwargs): + def __cinit__(self, op, *args, **kwargs): self.expr = NULL if isinstance(op, Expression): diff --git a/tools/python-yasm/floatnum.pxi b/tools/python-yasm/floatnum.pxi index 3939056f..b7bfbc30 100644 --- a/tools/python-yasm/floatnum.pxi +++ b/tools/python-yasm/floatnum.pxi @@ -25,7 +25,7 @@ cdef class FloatNum: cdef yasm_floatnum *flt - def __new__(self, value): + def __cinit__(self, value): self.flt = NULL if isinstance(value, FloatNum): self.flt = yasm_floatnum_copy((<FloatNum>value).flt) diff --git a/tools/python-yasm/intnum.pxi b/tools/python-yasm/intnum.pxi index f99769e6..0b469b89 100644 --- a/tools/python-yasm/intnum.pxi +++ b/tools/python-yasm/intnum.pxi @@ -57,7 +57,7 @@ cdef object __make_intnum(yasm_intnum *intn): cdef class IntNum: cdef yasm_intnum *intn - def __new__(self, value, base=None): + def __cinit__(self, value, base=None): cdef unsigned char buf[16] self.intn = NULL diff --git a/tools/python-yasm/symrec.pxi b/tools/python-yasm/symrec.pxi index d91fe7f5..404ffe97 100644 --- a/tools/python-yasm/symrec.pxi +++ b/tools/python-yasm/symrec.pxi @@ -26,7 +26,7 @@ cdef class Symbol: cdef yasm_symrec *sym - def __new__(self, symrec): + def __cinit__(self, symrec): self.sym = NULL if PyCObject_Check(symrec): self.sym = <yasm_symrec *>__get_voidp(symrec, Symbol) @@ -124,7 +124,7 @@ cdef class SymbolTable cdef class SymbolTableKeyIterator: cdef yasm_symtab_iter *iter - def __new__(self, symtab): + def __cinit__(self, symtab): if not isinstance(symtab, SymbolTable): raise TypeError self.iter = yasm_symtab_first((<SymbolTable>symtab).symtab) @@ -142,7 +142,7 @@ cdef class SymbolTableKeyIterator: cdef class SymbolTableValueIterator: cdef yasm_symtab_iter *iter - def __new__(self, symtab): + def __cinit__(self, symtab): if not isinstance(symtab, SymbolTable): raise TypeError self.iter = yasm_symtab_first((<SymbolTable>symtab).symtab) @@ -160,7 +160,7 @@ cdef class SymbolTableValueIterator: cdef class SymbolTableItemIterator: cdef yasm_symtab_iter *iter - def __new__(self, symtab): + def __cinit__(self, symtab): if not isinstance(symtab, SymbolTable): raise TypeError self.iter = yasm_symtab_first((<SymbolTable>symtab).symtab) @@ -190,7 +190,7 @@ cdef int __parse_vis(vis) except -1: cdef class SymbolTable: cdef yasm_symtab *symtab - def __new__(self): + def __cinit__(self): self.symtab = yasm_symtab_create() def __dealloc__(self): diff --git a/tools/python-yasm/value.pxi b/tools/python-yasm/value.pxi index f2328dd4..5d78c054 100644 --- a/tools/python-yasm/value.pxi +++ b/tools/python-yasm/value.pxi @@ -25,7 +25,7 @@ cdef class Value: cdef yasm_value value - def __new__(self, value=None, size=None): + def __cinit__(self, value=None, size=None): cdef unsigned int sz if size is None: sz = 0 |