~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_simple_set_pyx.pxd

Merge the 2.1-simple-set branch

But revert the changes to bzrlib/_btree_serializer_pyx.pyx that didn't end up in that branch.
And restore the export and import headers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    ctypedef struct PyObject:
28
28
        pass
29
29
 
 
30
 
30
31
cdef public api class SimpleSet [object SimpleSetObject, type SimpleSet_Type]:
31
32
    """A class similar to PySet, but with simpler implementation.
32
33
 
53
54
    cdef int _insert_clean(self, PyObject *key) except -1
54
55
    cdef Py_ssize_t _resize(self, Py_ssize_t min_unused) except -1
55
56
 
 
57
 
56
58
# TODO: might want to export the C api here, though it is all available from
57
59
#       the class object...
58
60
cdef api object SimpleSet_Add(object self, object key)
59
61
cdef api SimpleSet SimpleSet_New()
 
62
cdef api object SimpleSet_Add(object self, object key)
 
63
cdef api int SimpleSet_Contains(object self, object key) except -1
 
64
cdef api int SimpleSet_Discard(object self, object key) except -1
 
65
cdef api PyObject *SimpleSet_Get(SimpleSet self, object key) except? NULL
 
66
cdef api Py_ssize_t SimpleSet_Size(object self) except -1
 
67
cdef api int SimpleSet_Next(object self, Py_ssize_t *pos, PyObject **key)