mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-09 19:54:14 +03:00
tokenizer.pyx: add noexcept
to be compatible with Cython 3
This commit is contained in:
parent
18ba2cc33c
commit
07c3456406
|
@ -867,11 +867,11 @@ cdef extern from "<algorithm>" namespace "std" nogil:
|
|||
bint (*)(SpanC, SpanC))
|
||||
|
||||
|
||||
cdef bint len_start_cmp(SpanC a, SpanC b) nogil:
|
||||
cdef bint len_start_cmp(SpanC a, SpanC b) noexcept nogil:
|
||||
if a.end - a.start == b.end - b.start:
|
||||
return b.start < a.start
|
||||
return a.end - a.start < b.end - b.start
|
||||
|
||||
|
||||
cdef bint start_cmp(SpanC a, SpanC b) nogil:
|
||||
cdef bint start_cmp(SpanC a, SpanC b) noexcept nogil:
|
||||
return a.start < b.start
|
||||
|
|
Loading…
Reference in New Issue
Block a user