diff Objects/longobject.c @ 40641:342532f4536e

Fix the sqlite failure -- it was the usual, PyInt_Check -> PyInt_CheckExact. Clarify some OverflowError messages from the various PyLong_AsXXX methods.
author Guido van Rossum <guido@python.org>
date Mon, 15 Jan 2007 00:31:49 +0000
parents 4aee3f672f77
children d594ec858fe9
line wrap: on
line diff
--- a/Objects/longobject.c	Mon Jan 15 00:21:46 2007 +0000
+++ b/Objects/longobject.c	Mon Jan 15 00:31:49 2007 +0000
@@ -364,7 +364,7 @@
 		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 @@
 
  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 @@
 		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 @@
 		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 @@
 
 overflow:
 	PyErr_SetString(PyExc_OverflowError,
-		"int too large to convert to float");
+		"Python int too large to convert to C double");
 	return -1.0;
 }