summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-04-22 11:40:03 +0000
committerMartin v. Löwis <martin@v.loewis.de>2006-04-22 11:40:03 +0000
commit6685128b973981ff57b577f09b0a38e0071d272e (patch)
treec4d5536244f91e6c818b2ceb6335c56386156629 /Python
parent26fd9607c729f4dbe322967464834a2bce18c07d (diff)
downloadcpython-git-6685128b973981ff57b577f09b0a38e0071d272e.tar.gz
Fix more ssize_t issues.
Diffstat (limited to 'Python')
-rw-r--r--Python/ast.c2
-rw-r--r--Python/ceval.c4
-rw-r--r--Python/codecs.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 0b3b485465..353514c8c6 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -3034,7 +3034,7 @@ decode_unicode(const char *s, size_t len, int rawmode, const char *encoding)
if (*s & 0x80) { /* XXX inefficient */
PyObject *w;
char *r;
- int rn, i;
+ Py_ssize_t rn, i;
w = decode_utf8(&s, end, "utf-16-be");
if (w == NULL) {
Py_DECREF(u);
diff --git a/Python/ceval.c b/Python/ceval.c
index c0d87a5413..bfc6108390 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1560,7 +1560,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
/* XXX move into writeobject() ? */
if (PyString_Check(v)) {
char *s = PyString_AS_STRING(v);
- int len = PyString_GET_SIZE(v);
+ Py_ssize_t len = PyString_GET_SIZE(v);
if (len == 0 ||
!isspace(Py_CHARMASK(s[len-1])) ||
s[len-1] == ' ')
@@ -1569,7 +1569,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
#ifdef Py_USING_UNICODE
else if (PyUnicode_Check(v)) {
Py_UNICODE *s = PyUnicode_AS_UNICODE(v);
- int len = PyUnicode_GET_SIZE(v);
+ Py_ssize_t len = PyUnicode_GET_SIZE(v);
if (len == 0 ||
!Py_UNICODE_ISSPACE(s[len-1]) ||
s[len-1] == ' ')
diff --git a/Python/codecs.c b/Python/codecs.c
index 2124824f6c..77eac8ef7d 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -95,7 +95,7 @@ PyObject *_PyCodec_Lookup(const char *encoding)
{
PyInterpreterState *interp;
PyObject *result, *args = NULL, *v;
- int i, len;
+ Py_ssize_t i, len;
if (encoding == NULL) {
PyErr_BadArgument();