From: Stefan Behnel Date: Sat, 1 May 2010 16:56:04 +0000 (+0200) Subject: new test case for bug found in cython-devel that is fixed in cython-closures X-Git-Tag: 0.13.beta0~2^2~83 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a8bdadbe562a052c9ab978963fb3f13b12ebfe2f;p=cython.git new test case for bug found in cython-devel that is fixed in cython-closures --- 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 +