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

tim.peters python-checkins at python.org
Wed Mar 15 09:41:15 CET 2006


Author: tim.peters
Date: Wed Mar 15 09:41:15 2006
New Revision: 43041

Modified:
   python/trunk/Modules/_ctypes/cfield.c
Log:
CField_repr():  PyString_FromFormat() understands the
C99 "z" qualifier on all platforms.


Modified: python/trunk/Modules/_ctypes/cfield.c
==============================================================================
--- python/trunk/Modules/_ctypes/cfield.c	(original)
+++ python/trunk/Modules/_ctypes/cfield.c	Wed Mar 15 09:41:15 2006
@@ -250,11 +250,11 @@
 	name = ((PyTypeObject *)self->proto)->tp_name;
 
 	if (bits)
-		result = PyString_FromFormat("<Field type=%s, ofs=%d:%d, bits=%d>",
-					     name, (int)self->offset, size, bits);
+		result = PyString_FromFormat("<Field type=%s, ofs=%zd:%d, bits=%d>",
+					     name, self->offset, size, bits);
 	else
-		result = PyString_FromFormat("<Field type=%s, ofs=%d, size=%d>",
-					     name, (int)self->offset, size);
+		result = PyString_FromFormat("<Field type=%s, ofs=%zd, size=%d>",
+					     name, self->offset, size);
 	return result;
 }
 


More information about the Python-checkins mailing list