diff options
author | Christian Heimes <christian@cheimes.de> | 2008-08-22 20:10:27 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-08-22 20:10:27 (GMT) |
commit | 1cc69636effca5c74c49044b2c120aeaffacada9 (patch) | |
tree | 80b55012b16b49fe34ab4ab2187a021042c28b36 | |
parent | a27a62e74caece828fd34c6247dae8870f52d194 (diff) | |
download | cpython-1cc69636effca5c74c49044b2c120aeaffacada9.zip cpython-1cc69636effca5c74c49044b2c120aeaffacada9.tar.gz cpython-1cc69636effca5c74c49044b2c120aeaffacada9.tar.bz2 |
Fixed two format strings in the _collections module. For example
Modules/_collectionsmodule.c:674: warning: format '%i' expects type 'int', but argument 2 has type 'Py_ssize_t'
Reviewed by Benjamin Peterson
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rw-r--r-- | Modules/_collectionsmodule.c | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -23,6 +23,8 @@ Library - Silenced a trivial compiler warning in the sqlite module. +- Fixed two format strings in the _collections module. + What's New in Python 2.6 beta 3? ================================ diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 4517811..82bfb14 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -670,7 +670,7 @@ deque_repr(PyObject *deque) return NULL; } if (((dequeobject *)deque)->maxlen != -1) - fmt = PyString_FromFormat("deque(%%r, maxlen=%i)", + fmt = PyString_FromFormat("deque(%%r, maxlen=%" PY_FORMAT_SIZE_T "i)", ((dequeobject *)deque)->maxlen); else fmt = PyString_FromString("deque(%r)"); @@ -733,7 +733,7 @@ deque_tp_print(PyObject *deque, FILE *fp, int flags) if (((dequeobject *)deque)->maxlen == -1) fputs("])", fp); else - fprintf(fp, "], maxlen=%d)", ((dequeobject *)deque)->maxlen); + fprintf(fp, "], maxlen=%" PY_FORMAT_SIZE_T "d)", ((dequeobject *)deque)->maxlen); Py_END_ALLOW_THREADS return 0; } |