summaryrefslogtreecommitdiffstats
path: root/Objects/longobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-01-15 00:31:49 (GMT)
committerGuido van Rossum <guido@python.org>2007-01-15 00:31:49 (GMT)
commit523d4f942c108db6fcd94a26d1cfd1d579d49426 (patch)
tree95c7cc7634cb729d87b3161bfb42fde2e413082f /Objects/longobject.c
parentf4100005ae552ab4d5112b270a45c6091c30045e (diff)
downloadcpython-523d4f942c108db6fcd94a26d1cfd1d579d49426.zip
cpython-523d4f942c108db6fcd94a26d1cfd1d579d49426.tar.gz
cpython-523d4f942c108db6fcd94a26d1cfd1d579d49426.tar.bz2
Fix the sqlite failure -- it was the usual, PyInt_Check -> PyInt_CheckExact.
Clarify some OverflowError messages from the various PyLong_AsXXX methods.
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r--Objects/longobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 03d22f5..250215c 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -364,7 +364,7 @@ PyLong_AsLong(PyObject *vv)
Py_DECREF(vv);
}
PyErr_SetString(PyExc_OverflowError,
- "int too large to convert to int");
+ "Python int too large to convert to C long");
return -1;
}
@@ -427,7 +427,7 @@ PyLong_AsSsize_t(PyObject *vv) {
overflow:
PyErr_SetString(PyExc_OverflowError,
- "int too large to convert to ");
+ "Python int too large to convert to C ssize_t");
return -1;
}
@@ -462,7 +462,7 @@ PyLong_AsUnsignedLong(PyObject *vv)
x = (x << SHIFT) + v->ob_digit[i];
if ((x >> SHIFT) != prev) {
PyErr_SetString(PyExc_OverflowError,
- "int too large to convert");
+ "python int too large to convert to C unsigned long");
return (unsigned long) -1;
}
}
@@ -500,7 +500,7 @@ PyLong_AsSize_t(PyObject *vv)
x = (x << SHIFT) + v->ob_digit[i];
if ((x >> SHIFT) != prev) {
PyErr_SetString(PyExc_OverflowError,
- "int too large to convert");
+ "Python int too large to convert to C size_t");
return (unsigned long) -1;
}
}
@@ -943,7 +943,7 @@ PyLong_AsDouble(PyObject *vv)
overflow:
PyErr_SetString(PyExc_OverflowError,
- "int too large to convert to float");
+ "Python int too large to convert to C double");
return -1.0;
}