43
40
operations (difference, intersection, etc).
46
cdef readonly Py_ssize_t used # active
47
cdef readonly Py_ssize_t fill # active + dummy
48
cdef readonly Py_ssize_t mask # Table contains (mask+1) slots, a power
43
cdef Py_ssize_t _used # active
44
cdef Py_ssize_t _fill # active + dummy
45
cdef Py_ssize_t _mask # Table contains (mask+1) slots, a power
50
cdef PyObject **table # Pyrex/Cython doesn't support arrays to 'object'
47
cdef PyObject **_table # Pyrex/Cython doesn't support arrays to 'object'
51
48
# so we manage it manually
53
50
cdef PyObject *_get(self, object key) except? NULL
54
cpdef object add(self, key)
55
cpdef int discard(self, key) except -1
51
cdef object _add(self, key)
52
cdef int _discard(self, key) except -1
56
53
cdef int _insert_clean(self, PyObject *key) except -1
57
cpdef Py_ssize_t _resize(self, Py_ssize_t min_unused) except -1
54
cdef Py_ssize_t _resize(self, Py_ssize_t min_unused) except -1
59
56
# TODO: might want to export the C api here, though it is all available from
60
57
# the class object...
61
58
cdef api object SimpleSet_Add(object self, object key)
59
cdef api SimpleSet SimpleSet_New()