summaryrefslogtreecommitdiff
path: root/tests/errors/nogil.pyx
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2018-06-01 21:59:36 +0200
committerStefan Behnel <stefan_ml@behnel.de>2018-06-03 22:12:50 +0200
commit4f4841aa6e4e542f0bfc622cfa4d09dfc863a74d (patch)
tree56c9c38f62ddf6dc429d97e43a6970b03bd3a9e4 /tests/errors/nogil.pyx
parent08efed852e2d1c8c1f61732fd5ccbac745ab8561 (diff)
downloadcython-4f4841aa6e4e542f0bfc622cfa4d09dfc863a74d.tar.gz
Make raise-statements inside of nogil blocks automatically acquire the GIL, instead of requiring an explicit ``with gil`` block around them.
Diffstat (limited to 'tests/errors/nogil.pyx')
-rw-r--r--tests/errors/nogil.pyx3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/errors/nogil.pyx b/tests/errors/nogil.pyx
index 19356b5ad..1d22f9d9b 100644
--- a/tests/errors/nogil.pyx
+++ b/tests/errors/nogil.pyx
@@ -55,7 +55,7 @@ cdef object m():
print obj
del fred
return obj
- raise obj
+ raise obj # allowed!
if obj:
pass
while obj:
@@ -155,7 +155,6 @@ _ERRORS = u"""
55:8: Python print statement not allowed without gil
56:8: Deleting Python object not allowed without gil
57:8: Returning Python object not allowed without gil
-58:8: Raising exception not allowed without gil
59:11: Truth-testing Python object not allowed without gil
61:14: Truth-testing Python object not allowed without gil
63:8: For-loop using object bounds or target not allowed without gil