summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bytes.py
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2007-08-08 18:47:32 (GMT)
committerThomas Heller <theller@ctypes.org>2007-08-08 18:47:32 (GMT)
commit2fb5ac745bf2edd03261ca8144eb73a1f6e54af3 (patch)
tree411516f988845a5cc4a25c97262dcdab7f1171e4 /Lib/test/test_bytes.py
parentdf5f6b551ad89257a579682114ae9f2ab1d3755e (diff)
downloadcpython-2fb5ac745bf2edd03261ca8144eb73a1f6e54af3.zip
cpython-2fb5ac745bf2edd03261ca8144eb73a1f6e54af3.tar.gz
cpython-2fb5ac745bf2edd03261ca8144eb73a1f6e54af3.tar.bz2
Fix the ctypes tests. Patch from Victor Stinner. He writes:
The problem is that ctypes c_char (and c_char_p) creates unicode string instead of byte string. I attached a proposition (patch) to change this behaviour (use bytes for c_char). So in next example, it will display 'bytes' and not 'str': from ctypes import c_buffer, c_char buf = c_buffer("abcdef") print (type(buf[0])) Other behaviour changes: - repr(c_char) adds a "b" eg. repr(c_char('x')) is "c_char(b'x')" instead of "c_char('x')" - bytes is mutable whereas str is not: this may break some modules based on ctypes
Diffstat (limited to 'Lib/test/test_bytes.py')
0 files changed, 0 insertions, 0 deletions