[Python-Dev] [Python-checkins] r43041 - python/trunk/Modules/_ctypes/cfield.c

Tim Peters tim.peters at gmail.com
Wed Mar 15 10:03:12 CET 2006

>> CField_repr():  PyString_FromFormat() understands the
>> C99 "z" qualifier on all platforms.

[Martin v. Löwis]
> Unfortunately, only so in Python 2.5. If the code is also
> meant to be used for earlier versions, it won't work there
> at all.

Does that matter?  I checked the patch in on the Python trunk, and
that's 2.5 to me ;-)  The change was in:

static void
CField_repr(CFieldObject *self)


typedef struct {
	Py_ssize_t offset;
	Py_ssize_t size;
	Py_ssize_t index;		/* Index into CDataObject's
					   object array */
	PyObject *proto;		/* a type or NULL */
	GETFUNC getfunc;		/* getter function if proto is NULL */
	SETFUNC setfunc;		/* setter function if proto is NULL */
} CFieldObject;

has Py_ssize_t all over the place, and that's unique to 2.5 (so far) too, right?

More information about the Python-Dev mailing list