test case for ticket #99
authorStefan Behnel <scoder@users.berlios.de>
Sun, 8 Mar 2009 13:10:09 +0000 (14:10 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 8 Mar 2009 13:10:09 +0000 (14:10 +0100)
tests/bugs/char_constants_T99.pyx [new file with mode: 0644]

diff --git a/tests/bugs/char_constants_T99.pyx b/tests/bugs/char_constants_T99.pyx
new file mode 100644 (file)
index 0000000..580c893
--- /dev/null
@@ -0,0 +1,24 @@
+__doc__ = u"""
+>>> global_c_and_s()
+99
+abcdef
+
+>>> local_c_and_s()
+98
+bcdefg
+"""
+
+cdef char c = 'c'
+cdef char* s = 'abcdef'
+
+def global_c_and_s():
+    pys = s
+    print c
+    print pys.decode('ASCII')
+
+def local_c_and_s():
+    cdef char c = 'b'
+    cdef char* s = 'bcdefg'
+    pys = s
+    print c
+    print pys.decode('ASCII')