new test case for bug found in cython-devel that is fixed in cython-closures
authorStefan Behnel <scoder@users.berlios.de>
Sat, 1 May 2010 16:56:04 +0000 (18:56 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 1 May 2010 16:56:04 +0000 (18:56 +0200)
tests/run/pyparam_nogil.pyx [new file with mode: 0644]

diff --git a/tests/run/pyparam_nogil.pyx b/tests/run/pyparam_nogil.pyx
new file mode 100644 (file)
index 0000000..1d77c86
--- /dev/null
@@ -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
+