Commit 1cc69636 authored by Christian Heimes's avatar Christian Heimes

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
parent a27a62e7
...@@ -23,6 +23,8 @@ Library ...@@ -23,6 +23,8 @@ Library
- Silenced a trivial compiler warning in the sqlite module. - 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? What's New in Python 2.6 beta 3?
================================ ================================
......
...@@ -670,7 +670,7 @@ deque_repr(PyObject *deque) ...@@ -670,7 +670,7 @@ deque_repr(PyObject *deque)
return NULL; return NULL;
} }
if (((dequeobject *)deque)->maxlen != -1) 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); ((dequeobject *)deque)->maxlen);
else else
fmt = PyString_FromString("deque(%r)"); fmt = PyString_FromString("deque(%r)");
...@@ -733,7 +733,7 @@ deque_tp_print(PyObject *deque, FILE *fp, int flags) ...@@ -733,7 +733,7 @@ deque_tp_print(PyObject *deque, FILE *fp, int flags)
if (((dequeobject *)deque)->maxlen == -1) if (((dequeobject *)deque)->maxlen == -1)
fputs("])", fp); fputs("])", fp);
else else
fprintf(fp, "], maxlen=%d)", ((dequeobject *)deque)->maxlen); fprintf(fp, "], maxlen=%" PY_FORMAT_SIZE_T "d)", ((dequeobject *)deque)->maxlen);
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment