Ticket #15367: coerce_dict.pxd

File coerce_dict.pxd, 780 bytes (added by nbruin, 8 years ago)

MonoDict? and TripleDict? implemented by open addressing

Line 
1from cpython cimport PyObject
2
3cdef struct mono_cell
4
5cdef class MonoDict:
6    cdef __weakref__
7    cdef size_t mask
8    cdef size_t used
9    cdef size_t fill
10    cdef mono_cell* table
11    cdef bint weak_values
12    cdef eraser
13    cdef mono_cell* lookup(self,PyObject* key)
14    cdef get(self, object k)
15    cdef set(self, object k, value)
16    cdef resize(self)
17
18cdef struct triple_cell
19
20cdef class TripleDict:
21    cdef __weakref__
22    cdef size_t mask
23    cdef size_t used
24    cdef size_t fill
25    cdef triple_cell* table
26    cdef bint weak_values
27    cdef eraser
28    cdef triple_cell* lookup(self, PyObject* key1, PyObject* key2, PyObject* key3)
29    cdef get(self, object k1, object k2, object k3)
30    cdef set(self, object k1, object k2, object k3, value)
31    cdef resize(self)