/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/_simple_set_pyx.pxd

  • Committer: Jelmer Vernooij
  • Date: 2020-11-19 18:28:52 UTC
  • mto: This revision was merged to the branch mainline in revision 7526.
  • Revision ID: jelmer@jelmer.uk-20201119182852-4za22s5mhakix4dq
Remove sixish data type.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
16
#
 
17
# cython: language_level=3
16
18
 
17
19
"""Interface definition of a class like PySet but without caching the hash.
18
20
 
23
25
     eg. SimpleSet.add(key) => saved_key and SimpleSet[key] => saved_key
24
26
"""
25
27
 
26
 
cdef extern from "Python.h":
27
 
    ctypedef struct PyObject:
28
 
        pass
 
28
from cpython.object cimport PyObject
29
29
 
30
30
 
31
31
cdef public api class SimpleSet [object SimpleSetObject, type SimpleSet_Type]:
74
74
                            # so we manage it manually
75
75
 
76
76
    cdef PyObject *_get(self, object key) except? NULL
77
 
    cdef object _add(self, key)
78
 
    cdef int _discard(self, key) except -1
 
77
    cpdef object add(self, key)
 
78
    cpdef bint discard(self, key) except -1
79
79
    cdef int _insert_clean(self, PyObject *key) except -1
80
80
    cdef Py_ssize_t _resize(self, Py_ssize_t min_unused) except -1
81
81