summaryrefslogtreecommitdiff
path: root/Python/exceptions.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-03-07 12:08:51 +0000
committerMartin v. Löwis <martin@v.loewis.de>2006-03-07 12:08:51 +0000
commit6f237c65900b6b00dc141265f0fa1f8b4e909142 (patch)
treef11cf9bfcfc622aea3f6dd56d7aa047fa774e271 /Python/exceptions.c
parent61c2602414cadf72b4e1b58b5dc42ff9fe477369 (diff)
downloadcpython-6f237c65900b6b00dc141265f0fa1f8b4e909142.tar.gz
Change int to Py_ssize_t in several places.
Add (int) casts to silence compiler warnings. Raise Python exceptions for overflows.
Diffstat (limited to 'Python/exceptions.c')
-rw-r--r--Python/exceptions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/exceptions.c b/Python/exceptions.c
index 5dec197bd8..b146c971b9 100644
--- a/Python/exceptions.c
+++ b/Python/exceptions.c
@@ -764,7 +764,7 @@ static PyObject *
SyntaxError__init__(PyObject *self, PyObject *args)
{
PyObject *rtnval = NULL;
- int lenargs;
+ Py_ssize_t lenargs;
if (!(self = get_self(args)))
return NULL;
@@ -889,7 +889,7 @@ SyntaxError__str__(PyObject *self, PyObject *args)
PyErr_Clear();
if (have_filename || have_lineno) {
- int bufsize = PyString_GET_SIZE(str) + 64;
+ Py_ssize_t bufsize = PyString_GET_SIZE(str) + 64;
if (have_filename)
bufsize += PyString_GET_SIZE(filename);