--- /src_root/cpython/Objects/unicodeobject.c Mon Jun 16 18:00:17 2014 +++ /vms_root/cpython/Objects/unicodeobject.c Fri Jun 20 22:00:34 2014 @@ -1011,17 +1011,19 @@ } else data = unicode->data.any; - printf("%s: len=%zu, ",unicode_kind_name(op), ascii->length); + printf("%s: len=%" PY_FORMAT_SIZE_T "u, ", + unicode_kind_name(op), ascii->length); if (ascii->wstr == data) printf("shared "); printf("wstr=%p", ascii->wstr); if (!(ascii->state.ascii == 1 && ascii->state.compact == 1)) { - printf(" (%zu), ", compact->wstr_length); + printf(" (%" PY_FORMAT_SIZE_T "u), ", compact->wstr_length); if (!ascii->state.compact && compact->utf8 == unicode->data.any) printf("shared "); - printf("utf8=%p (%zu)", compact->utf8, compact->utf8_length); + printf("utf8=%p (%" PY_FORMAT_SIZE_T "u)", + compact->utf8, compact->utf8_length); } printf(", data=%p\n", data); } @@ -1370,8 +1372,9 @@ how_many = Py_MIN(PyUnicode_GET_LENGTH(from), how_many); if (to_start + how_many > PyUnicode_GET_LENGTH(to)) { PyErr_Format(PyExc_SystemError, - "Cannot write %zi characters at %zi " - "in a string of %zi characters", + "Cannot write %" PY_FORMAT_SIZE_T "i characters at %" + PY_FORMAT_SIZE_T "i in a string of %" + PY_FORMAT_SIZE_T "i characters", how_many, to_start, PyUnicode_GET_LENGTH(to)); return -1; } @@ -4080,7 +4083,9 @@ if (newpos<0) newpos = insize+newpos; if (newpos<0 || newpos>insize) { - PyErr_Format(PyExc_IndexError, "position %zd from error handler out of bounds", newpos); + PyErr_Format(PyExc_IndexError, + "position %" PY_FORMAT_SIZE_T + "d from error handler out of bounds", newpos); goto onError; } @@ -4173,7 +4178,9 @@ if (newpos<0) newpos = insize+newpos; if (newpos<0 || newpos>insize) { - PyErr_Format(PyExc_IndexError, "position %zd from error handler out of bounds", newpos); + PyErr_Format(PyExc_IndexError, + "position %" PY_FORMAT_SIZE_T + "d from error handler out of bounds", newpos); goto onError; } @@ -6436,7 +6443,9 @@ if (*newpos<0) *newpos = len + *newpos; if (*newpos<0 || *newpos>len) { - PyErr_Format(PyExc_IndexError, "position %zd from error handler out of bounds", *newpos); + PyErr_Format(PyExc_IndexError, + "position %" PY_FORMAT_SIZE_T + "d from error handler out of bounds", *newpos); Py_DECREF(restuple); return NULL; } @@ -8436,7 +8445,9 @@ else *newpos = i_newpos; if (*newpos<0 || *newpos>PyUnicode_GET_LENGTH(unicode)) { - PyErr_Format(PyExc_IndexError, "position %zd from error handler out of bounds", *newpos); + PyErr_Format(PyExc_IndexError, + "position %" PY_FORMAT_SIZE_T + "d from error handler out of bounds", *newpos); Py_DECREF(restuple); return NULL; } @@ -9764,7 +9775,8 @@ item = items[i]; if (!PyUnicode_Check(item)) { PyErr_Format(PyExc_TypeError, - "sequence item %zd: expected str instance," + "sequence item %" PY_FORMAT_SIZE_T + "d: expected str instance," " %.80s found", i, Py_TYPE(item)->tp_name); goto onError; @@ -14454,7 +14466,7 @@ default: PyErr_Format(PyExc_ValueError, "unsupported format character '%c' (0x%x) " - "at index %zd", + "at index %" PY_FORMAT_SIZE_T "d", (31<=arg->ch && arg->ch<=126) ? (char)arg->ch : '?', (int)arg->ch, ctx->fmtpos - 1);