Skip to content

Commit

Permalink
Cython complaints about place of nogil
Browse files Browse the repository at this point in the history
  • Loading branch information
malb committed Aug 4, 2023
1 parent d9350f7 commit 27262e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cysignals/signals.pxd.in
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ cdef extern from "macros.h" nogil:
# can be used to make Cython check whether there is a pending exception
# (PyErr_Occurred() is non-NULL). To Cython, it will look like
# cython_check_exception() actually raised the exception.
cdef inline void cython_check_exception() nogil except *:
cdef inline void cython_check_exception() except * nogil:
pass


Expand Down
6 changes: 3 additions & 3 deletions src/cysignals/tests.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def test_sig_on_cython(long delay=DEFAULT_DELAY):
signal_after_delay(SIGINT, delay)
c_test_sig_on_cython()

cdef int c_test_sig_on_cython_except() nogil except 42:
cdef int c_test_sig_on_cython_except() except 42 nogil:
sig_on()
infinite_loop()

Expand All @@ -293,7 +293,7 @@ def test_sig_on_cython_except(long delay=DEFAULT_DELAY):
signal_after_delay(SIGINT, delay)
c_test_sig_on_cython_except()

cdef void c_test_sig_on_cython_except_all() nogil except *:
cdef void c_test_sig_on_cython_except_all() except * nogil:
sig_on()
infinite_loop()

Expand Down Expand Up @@ -1297,7 +1297,7 @@ def test_thread_sig_block(long delay=DEFAULT_DELAY):
sig_off()


cdef void* func_thread_sig_block(void* ignored) nogil:
cdef void* func_thread_sig_block(void* ignored) noexcept nogil:
# This is executed by the two threads spawned by test_thread_sig_block()
cdef int n
for n in range(1000000):
Expand Down

0 comments on commit 27262e7

Please sign in to comment.