From 528fe9dfa9ee19ea929d623ada7135be7bdcc5a7 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 8 Mar 2009 14:10:09 +0100 Subject: [PATCH] test case for ticket #99 --- tests/bugs/char_constants_T99.pyx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/bugs/char_constants_T99.pyx diff --git a/tests/bugs/char_constants_T99.pyx b/tests/bugs/char_constants_T99.pyx new file mode 100644 index 00000000..580c8935 --- /dev/null +++ b/tests/bugs/char_constants_T99.pyx @@ -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') -- 2.26.2