]> granicus.if.org Git - python/commit
Apply the patch #1532975 plus ideas from the patch #1533481.
authorThomas Heller <theller@ctypes.org>
Mon, 14 Aug 2006 11:17:48 +0000 (11:17 +0000)
committerThomas Heller <theller@ctypes.org>
Mon, 14 Aug 2006 11:17:48 +0000 (11:17 +0000)
commit867200483bd518d4fbd9e3d16f8785b6395af9b7
tree6520737e434c243517ef30a6e3d3e8cdd07d0b6c
parent040f76b79c0ce86dc33b9c525fbcd84b2254e559
Apply the patch #1532975 plus ideas from the patch #1533481.

ctypes instances no longer have the internal and undocumented
'_as_parameter_' attribute which was used to adapt them to foreign
function calls; this mechanism is replaced by a function pointer in
the type's stgdict.

In the 'from_param' class methods, try the _as_parameter_ attribute if
other conversions are not possible.

This makes the documented _as_parameter_ mechanism work as intended.

Change the ctypes version number to 1.0.1.
Lib/ctypes/__init__.py
Lib/ctypes/test/test_as_parameter.py [new file with mode: 0644]
Lib/ctypes/test/test_numbers.py
Lib/ctypes/test/test_prototypes.py
Misc/NEWS
Modules/_ctypes/_ctypes.c
Modules/_ctypes/callproc.c
Modules/_ctypes/ctypes.h