Mercurial > cpython-lru_cache-weakref
diff Modules/_codecsmodule.c @ 37920:ce5585afc20f legacy-trunk
Fix more ssize_t issues.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Sat, 22 Apr 2006 11:40:03 +0000 |
| parents | 7fdc639bc5b4 |
| children | 68e1a02a5b29 |
line wrap: on
line diff
--- a/Modules/_codecsmodule.c Sat Apr 22 11:15:41 2006 +0000 +++ b/Modules/_codecsmodule.c Sat Apr 22 11:40:03 2006 +0000 @@ -169,7 +169,7 @@ static PyObject *codec_tuple(PyObject *unicode, - int len) + Py_ssize_t len) { PyObject *v,*w; @@ -181,7 +181,7 @@ return NULL; } PyTuple_SET_ITEM(v,0,unicode); - w = PyInt_FromLong(len); + w = PyInt_FromSsize_t(len); if (w == NULL) { Py_DECREF(v); return NULL; @@ -213,7 +213,7 @@ PyObject *str; const char *errors = NULL; char *buf; - int len; + Py_ssize_t len; if (!PyArg_ParseTuple(args, "O!|z:escape_encode", &PyString_Type, &str, &errors))
