File tree 3 files changed +8
-8
lines changed
3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -35,35 +35,35 @@ cdef extern from *:
35
35
int unlikely(int ) nogil # Defined by Cython
36
36
37
37
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:
39
39
sig_block()
40
40
cdef void * ret = malloc(n)
41
41
sig_unblock()
42
42
return ret
43
43
44
44
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:
46
46
sig_block()
47
47
cdef void * ret = realloc(ptr, size)
48
48
sig_unblock()
49
49
return ret
50
50
51
51
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:
53
53
sig_block()
54
54
cdef void * ret = calloc(nmemb, size)
55
55
sig_unblock()
56
56
return ret
57
57
58
58
59
- cdef inline void sig_free " sig_free" (void * ptr) nogil:
59
+ cdef inline void sig_free " sig_free" (void * ptr) noexcept nogil:
60
60
sig_block()
61
61
free(ptr)
62
62
sig_unblock()
63
63
64
64
65
65
@ 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:
67
67
"""
68
68
Return a*b, checking for overflow. Assume that a > 0.
69
69
If overflow occurs, return <size_t>(-1).
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ cdef extern from *:
6
6
int unlikely(int ) nogil # defined by Cython
7
7
8
8
9
- cdef inline void * align(void * ptr, size_t alignment):
9
+ cdef inline void * align(void * ptr, size_t alignment) noexcept :
10
10
"""
11
11
Round up ``ptr`` to the nearest multiple of ``alignment``, which
12
12
must be a power of 2
Original file line number Diff line number Diff line change 3
3
# Usage of ``sig_block`` / ``sig_unblock`` is not necesarry for ``MemoryAllocator``:
4
4
# One should not wrap its methods with ``sig_on`` ... ``sig_off`` anyway.
5
5
6
- cdef inline void sig_block() nogil:
6
+ cdef inline void sig_block() noexcept nogil:
7
7
pass
8
8
9
- cdef inline void sig_unblock() nogil:
9
+ cdef inline void sig_unblock() noexcept nogil:
10
10
pass
You can’t perform that action at this time.
0 commit comments