| Index: third_party/yasm/patched-yasm/tools/python-yasm/symrec.pxi
|
| ===================================================================
|
| --- third_party/yasm/patched-yasm/tools/python-yasm/symrec.pxi (revision 71129)
|
| +++ third_party/yasm/patched-yasm/tools/python-yasm/symrec.pxi (working copy)
|
| @@ -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)
|
| @@ -43,15 +43,15 @@
|
| cdef yasm_sym_status status
|
| s = set()
|
| status = yasm_symrec_get_status(self.sym)
|
| - if <int>status & <int>SYM_USED: s.add('used')
|
| - if <int>status & <int>SYM_DEFINED: s.add('defined')
|
| - if <int>status & <int>SYM_VALUED: s.add('valued')
|
| + if <int>status & <int>YASM_SYM_USED: s.add('used')
|
| + if <int>status & <int>YASM_SYM_DEFINED: s.add('defined')
|
| + if <int>status & <int>YASM_SYM_VALUED: s.add('valued')
|
| return s
|
|
|
| property in_table:
|
| def __get__(self):
|
| return bool(<int>yasm_symrec_get_status(self.sym) &
|
| - <int>SYM_NOTINTABLE)
|
| + <int>YASM_SYM_NOTINTABLE)
|
|
|
| property visibility:
|
| def __get__(self):
|
| @@ -124,7 +124,7 @@
|
| 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 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 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 class SymbolTable:
|
| cdef yasm_symtab *symtab
|
|
|
| - def __new__(self):
|
| + def __cinit__(self):
|
| self.symtab = yasm_symtab_create()
|
|
|
| def __dealloc__(self):
|
|
|