cpython/Modules/_ctypes
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
..
darwin Copy ctypes-0.9.9.4 sources from external into the trunk. 2006-03-08 19:35:11 +00:00
libffi Merged revisions 55817-55961 via svnmerge from 2007-06-13 18:07:49 +00:00
libffi_arm_wince Copy ctypes-0.9.9.4 sources from external into the trunk. 2006-03-08 19:35:11 +00:00
libffi_msvc Merged revisions 55325-55327 via svnmerge from 2007-05-14 22:51:27 +00:00
_ctypes.c Fix merge breakage. 2007-07-21 18:47:48 +00:00
_ctypes_test.c Remove all the Python 2.3 compatibility markers (the Python 3 ctypes 2007-07-13 11:49:15 +00:00
_ctypes_test.h Copy ctypes-0.9.9.4 sources from external into the trunk. 2006-03-08 19:35:11 +00:00
callbacks.c Merged revisions 56301-56442 via svnmerge from 2007-07-18 18:15:48 +00:00
callproc.c Merged revisions 56467-56482 via svnmerge from 2007-07-21 17:22:18 +00:00
cfield.c Fix the ctypes tests. Patch from Victor Stinner. He writes: 2007-08-08 18:47:32 +00:00
ctypes.h Merged revisions 56301-56442 via svnmerge from 2007-07-18 18:15:48 +00:00
ctypes_dlfcn.h Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
malloc_closure.c Remove all the Python 2.3 compatibility markers (the Python 3 ctypes 2007-07-13 11:49:15 +00:00
stgdict.c Merged revisions 56467-56482 via svnmerge from 2007-07-21 17:22:18 +00:00