summaryrefslogtreecommitdiffstats
path: root/Modules/_codecsmodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-04-22 11:40:03 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-04-22 11:40:03 (GMT)
commit6685128b973981ff57b577f09b0a38e0071d272e (patch)
treec4d5536244f91e6c818b2ceb6335c56386156629 /Modules/_codecsmodule.c
parent26fd9607c729f4dbe322967464834a2bce18c07d (diff)
downloadcpython-6685128b973981ff57b577f09b0a38e0071d272e.zip
cpython-6685128b973981ff57b577f09b0a38e0071d272e.tar.gz
cpython-6685128b973981ff57b577f09b0a38e0071d272e.tar.bz2
Fix more ssize_t issues.
Diffstat (limited to 'Modules/_codecsmodule.c')
-rw-r--r--Modules/_codecsmodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_codecsmodule.c b/Modules/_codecsmodule.c
index 39b443b..26bc2cb 100644
--- a/Modules/_codecsmodule.c
+++ b/Modules/_codecsmodule.c
@@ -169,7 +169,7 @@ codec_decode(PyObject *self, PyObject *args)
static
PyObject *codec_tuple(PyObject *unicode,
- int len)
+ Py_ssize_t len)
{
PyObject *v,*w;
@@ -181,7 +181,7 @@ PyObject *codec_tuple(PyObject *unicode,
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 @@ escape_encode(PyObject *self,
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))