summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2006-03-15 08:41:15 (GMT)
committerTim Peters <tim.peters@gmail.com>2006-03-15 08:41:15 (GMT)
commitab8aeba51749d5a7beb818804eaf3047207eae5e (patch)
tree7c8d322f5107c1be505cf174168025aeb9b9bb98 /Modules
parentd77eb1ff43013af0b1f40172df4866a32ef74605 (diff)
downloadcpython-ab8aeba51749d5a7beb818804eaf3047207eae5e.zip
cpython-ab8aeba51749d5a7beb818804eaf3047207eae5e.tar.gz
cpython-ab8aeba51749d5a7beb818804eaf3047207eae5e.tar.bz2
CField_repr(): PyString_FromFormat() understands the
C99 "z" qualifier on all platforms.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/cfield.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c
index de41571..3e759fe 100644
--- a/Modules/_ctypes/cfield.c
+++ b/Modules/_ctypes/cfield.c
@@ -250,11 +250,11 @@ CField_repr(CFieldObject *self)
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;
}