summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2019-02-23 10:33:27 +0100
committerStefan Behnel <stefan_ml@behnel.de>2019-02-23 10:33:27 +0100
commit76a51a3f5935405cd29afd546e0e5f5c17448a5e (patch)
tree191c08274d63cdf46a8cdbd6c1b69c5080d20175
parent605cc2143259e07ecd7df7aad79a37197fd011a2 (diff)
downloadcython-76a51a3f5935405cd29afd546e0e5f5c17448a5e.tar.gz
Avoid ambiguous error return value in tests.
-rw-r--r--tests/run/nogil.pyx4
-rw-r--r--tests/run/sequential_parallel.pyx2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/run/nogil.pyx b/tests/run/nogil.pyx
index c6f6d8b53..6649ee071 100644
--- a/tests/run/nogil.pyx
+++ b/tests/run/nogil.pyx
@@ -28,10 +28,10 @@ cdef int g(int x) nogil:
y = x + 42
return y
-cdef int with_gil_func() except 0 with gil:
+cdef int with_gil_func() except -1 with gil:
raise Exception("error!")
-cdef int nogil_func() nogil except 0:
+cdef int nogil_func() nogil except -1:
with_gil_func()
def test_nogil_exception_propagation():
diff --git a/tests/run/sequential_parallel.pyx b/tests/run/sequential_parallel.pyx
index 13a62e22b..d77c88561 100644
--- a/tests/run/sequential_parallel.pyx
+++ b/tests/run/sequential_parallel.pyx
@@ -660,7 +660,7 @@ def outer_parallel_section():
sum += inner_parallel_section()
return sum
-cdef int nogil_cdef_except_clause() nogil except 0:
+cdef int nogil_cdef_except_clause() nogil except -1:
return 1
cdef void nogil_cdef_except_star() nogil except *: