mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.10] bpo-43853: Expand test suite for SQLite UDF's (GH-27642) (GH-31030)
* [3.10] bpo-43853: Expand test suite for SQLite UDF's (GH-27642).
(cherry picked from commit 3eb3b4f270)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* Fix test_func_return_too_large_int
GH-27613 (bpo 44839) was not backported, so exceptions differ between
main (3.11) and older versions.
This commit is contained in:
parent
f1916cde24
commit
ba457fe6f8
3 changed files with 79 additions and 66 deletions
|
|
@ -172,9 +172,16 @@ int pysqlite_statement_bind_parameter(pysqlite_Statement* self, int pos, PyObjec
|
|||
rc = sqlite3_bind_int64(self->st, pos, value);
|
||||
break;
|
||||
}
|
||||
case TYPE_FLOAT:
|
||||
rc = sqlite3_bind_double(self->st, pos, PyFloat_AsDouble(parameter));
|
||||
case TYPE_FLOAT: {
|
||||
double value = PyFloat_AsDouble(parameter);
|
||||
if (value == -1 && PyErr_Occurred()) {
|
||||
rc = -1;
|
||||
}
|
||||
else {
|
||||
rc = sqlite3_bind_double(self->st, pos, value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TYPE_UNICODE:
|
||||
string = PyUnicode_AsUTF8AndSize(parameter, &buflen);
|
||||
if (string == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue