2003-02-07 Thomas Heller * source/_ctypes.c: PointerType_new, ArrayType_new, SimpleType_new, and CFunctionType_new did not check for NULL result from PyType_Type.tp_new() call. This call will fail in Python 2.3 when 'object' is listed as the first base class with a TypeError: MRO conflict among bases. Spotted by Greg Chapman. 2003-02-05 Thomas Heller * The 'raw' and 'value' properties of c_wstring are back, also fixed some severe bugs (it seems c_wstring never worked correctly). Added unittests. * Fixed a problem in c_string: The NUL byte at the buffer end could be overwritten. Added unittests for c_strings. Per suggestion from Niki Spahiev, CFieldObjects now have a readonly size and offset property. Added short docs for them. 2003-01-31 Thomas Heller * Item deletion on Array or Pointer instances did crash with a NULL pointer access. Added unittest for this, and also for Arrays. 2003-01-28 Thomas Heller * source\_ctypes.c: Dangerous code checked in. Pointer instances can point to a single data item, or they can point to an array of values. Back in the distant past ;-), I had a SetSize() method, which would enable indexes != 0. Don't know when and why I removed it, but I need it again. Should it have to be enabled explicitely? Would be better, it seems. Note that there's no corresponding ass_item implementation with indexes != 0. This means, we can get and change the items the pointer points to, if they are mutable, but not replace the items by different ones. 2003-01-24 Thomas Heller * (several): Fixed the alignment and size of the compound datatypes Structure, Union, and hopefully also Array. 2003-01-23 Thomas Heller * source/_ctypes.c: Raise a TypeError if a SimpleCData type or a CDataType is specified as a CFunction's restype. * source/_ctypes.c: CFunction now has a from_param class method. This means that CFunction subclasses can now be used in the argtypes attribute, and so typechecking is done. * unittests: Rewrote the tests from doctest to pyunit. 2003-01-21 Thomas Heller * source/: Merged in these changes from the C_FAST_CARGS branch: ConvParam returns PyCArgObject instances now. Fixed the _as_parameter_ properties of Array, CString, and CFunction so that they 'return' PyCArgObject instances instead of magic tuples. Added a public 'P' fielddescriptor, which is mostly for internal use. The 's' rettype value for functions is probably useless, because functions return *pointers* to strings (char *), not strings. Adapted all the unittests to work, and also changed the samples. 2003-01-20 Thomas Heller * source/*.[ch]: Introduced PyCArgObject objects, which contain a Python object itself and also the data converted to C. This replaces the magic 3-tuples, and should be somewhat faster because no two conversions take place. This is now used by SimpleType_from_param(), byref(), and Pointer_as_parameter(), and is understood by ConvParam(). In the long run this should be the only thing (besides primitive Python data types with trivial conversions) used by ConvParam(). Also ConvParam should probably *return* these things. 2003-01-17 Thomas Heller * source/_ctypes.c: Rewrite of SimpleType_from_param complete. unittests/test_parameters.py shows that it does the right things in most cases. * (Repository): Moved everything from local CVS to the SF repository, and restructured the directories.