/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 bzrlib/_simple_set_pyx.pyx

  • Committer: John Arbash Meinel
  • Date: 2010-01-05 05:28:42 UTC
  • mto: This revision was merged to the branch mainline in revision 4936.
  • Revision ID: john@arbash-meinel.com-20100105052842-pegkjxr8pwec0ovn
Clean up _simple_set.pyx, and handle 'nogil'.

This took a bit more than I thought, as we had to start handling 'api'
and 'public api' definitions. As well as 'nogil'.
I'm a bit concerned that the regex is getting a bit complex, but it
seems to be finding what I want it to.

Show diffs side-by-side

added added

removed removed

Lines of Context:
540
540
    return _check_self(self)._used
541
541
 
542
542
 
543
 
cdef api int SimpleSet_Next(object self, Py_ssize_t *pos, PyObject **key):
 
543
cdef api int SimpleSet_Next(object self, Py_ssize_t *pos,
 
544
                            PyObject **key) except -1:
544
545
    """Walk over items in a SimpleSet.
545
546
 
546
547
    :param pos: should be initialized to 0 by the caller, and will be updated
567
568
    return 1
568
569
 
569
570
 
570
 
cdef int SimpleSet_traverse(SimpleSet self, visitproc visit, void *arg):
 
571
cdef int SimpleSet_traverse(SimpleSet self, visitproc visit,
 
572
                            void *arg) except -1:
571
573
    """This is an implementation of 'tp_traverse' that hits the whole table.
572
574
 
573
575
    Cython/Pyrex don't seem to let you define a tp_traverse, and they only