From a8bdadbe562a052c9ab978963fb3f13b12ebfe2f Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 1 May 2010 18:56:04 +0200 Subject: [PATCH] new test case for bug found in cython-devel that is fixed in cython-closures --- tests/run/pyparam_nogil.pyx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/run/pyparam_nogil.pyx diff --git a/tests/run/pyparam_nogil.pyx b/tests/run/pyparam_nogil.pyx new file mode 100644 index 00000000..1d77c86e --- /dev/null +++ b/tests/run/pyparam_nogil.pyx @@ -0,0 +1,18 @@ + +def if_list_nogil(list obj): + """ + >>> if_list_nogil( [] ) + False + >>> if_list_nogil( [1] ) + True + >>> if_list_nogil(None) + False + """ + return _if_list_nogil(obj) + +cdef bint _if_list_nogil(list obj) nogil: + if obj: + return True + else: + return False + -- 2.26.2