Core and Builtins
-----------------
-- Int/Long unification is halfway complete. There are a few broken tests,
- the 'long' built-in hasn't been removed yet, and literals with trailing
- 'L' or 'l' are still recognized. Performance may be sub-optimal.
+- Int/Long unification is halfway complete. The 'long' built-in type
+ hasn't been removed yet, and literals with trailing 'L' or 'l' are
+ still recognized. Performance may be sub-optimal.
- 'except E, V' must now be spelled as 'except E as V' and deletes V
at the end of the except clause; V must be a simple name.
if (parameter == Py_None) {
rc = sqlite3_bind_null(self->st, pos);
- } else if (PyInt_Check(parameter)) {
+ } else if (PyInt_CheckExact(parameter)) {
longval = PyInt_AsLong(parameter);
rc = sqlite3_bind_int64(self->st, pos, (sqlite_int64)longval);
#ifdef HAVE_LONG_LONG
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;
}
overflow:
PyErr_SetString(PyExc_OverflowError,
- "int too large to convert to ");
+ "Python int too large to convert to C ssize_t");
return -1;
}
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;
}
}
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;
}
}
overflow:
PyErr_SetString(PyExc_OverflowError,
- "int too large to convert to float");
+ "Python int too large to convert to C double");
return -1.0;
}