Files
cpython/Lib
Thomas Heller 2fb5ac745b 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
2007-08-08 18:47:32 +00:00
..
2007-08-07 23:03:33 +00:00
2007-05-22 21:56:47 +00:00
2007-05-27 09:20:49 +00:00
2007-06-07 22:37:45 +00:00
2007-07-20 00:30:38 +00:00
2007-07-16 23:36:05 +00:00
2007-08-07 05:37:39 +00:00
2007-07-23 00:24:10 +00:00
2007-05-27 09:19:04 +00:00
2007-08-07 18:36:16 +00:00
2007-07-20 17:45:09 +00:00
2007-07-23 21:28:30 +00:00
2007-07-26 03:19:46 +00:00