mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-10 16:22:29 +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))
|
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:
|
if a.end - a.start == b.end - b.start:
|
||||||
return b.start < a.start
|
return b.start < a.start
|
||||||
return a.end - a.start < b.end - b.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
|
return a.start < b.start
|
||||||
|
|
Loading…
Reference in New Issue
Block a user