File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -35,35 +35,35 @@ cdef extern from *:
3535 int unlikely(int ) nogil # Defined by Cython
3636
3737
38- cdef inline void * sig_malloc " sig_malloc" (size_t n) nogil:
38+ cdef inline void * sig_malloc " sig_malloc" (size_t n) noexcept nogil:
3939 sig_block()
4040 cdef void * ret = malloc(n)
4141 sig_unblock()
4242 return ret
4343
4444
45- cdef inline void * sig_realloc " sig_realloc" (void * ptr, size_t size) nogil:
45+ cdef inline void * sig_realloc " sig_realloc" (void * ptr, size_t size) noexcept nogil:
4646 sig_block()
4747 cdef void * ret = realloc(ptr, size)
4848 sig_unblock()
4949 return ret
5050
5151
52- cdef inline void * sig_calloc " sig_calloc" (size_t nmemb, size_t size) nogil:
52+ cdef inline void * sig_calloc " sig_calloc" (size_t nmemb, size_t size) noexcept nogil:
5353 sig_block()
5454 cdef void * ret = calloc(nmemb, size)
5555 sig_unblock()
5656 return ret
5757
5858
59- cdef inline void sig_free " sig_free" (void * ptr) nogil:
59+ cdef inline void sig_free " sig_free" (void * ptr) noexcept nogil:
6060 sig_block()
6161 free(ptr)
6262 sig_unblock()
6363
6464
6565@ cython.cdivision (True )
66- cdef inline size_t mul_overflowcheck(size_t a, size_t b) nogil:
66+ cdef inline size_t mul_overflowcheck(size_t a, size_t b) noexcept nogil:
6767 """
6868 Return a*b, checking for overflow. Assume that a > 0.
6969 If overflow occurs, return <size_t>(-1).
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ cdef extern from *:
66 int unlikely(int ) nogil # defined by Cython
77
88
9- cdef inline void * align(void * ptr, size_t alignment):
9+ cdef inline void * align(void * ptr, size_t alignment) noexcept :
1010 """
1111 Round up ``ptr`` to the nearest multiple of ``alignment``, which
1212 must be a power of 2
Original file line number Diff line number Diff line change 33# Usage of ``sig_block`` / ``sig_unblock`` is not necesarry for ``MemoryAllocator``:
44# One should not wrap its methods with ``sig_on`` ... ``sig_off`` anyway.
55
6- cdef inline void sig_block() nogil:
6+ cdef inline void sig_block() noexcept nogil:
77 pass
88
9- cdef inline void sig_unblock() nogil:
9+ cdef inline void sig_unblock() noexcept nogil:
1010 pass
You can’t perform that action at this time.
0 commit comments