mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Replace _pysqlite_long_from_int64() with PyLong_FromLongLong() (GH-16882)
This commit is contained in:
parent
ea6041cd7f
commit
b6f5b9dd21
4 changed files with 3 additions and 20 deletions
|
@ -277,7 +277,7 @@ _pysqlite_fetch_one_row(pysqlite_Cursor* self)
|
|||
Py_INCREF(Py_None);
|
||||
converted = Py_None;
|
||||
} else if (coltype == SQLITE_INTEGER) {
|
||||
converted = _pysqlite_long_from_int64(sqlite3_column_int64(self->statement->st, i));
|
||||
converted = PyLong_FromLongLong(sqlite3_column_int64(self->statement->st, i));
|
||||
} else if (coltype == SQLITE_FLOAT) {
|
||||
converted = PyFloat_FromDouble(sqlite3_column_double(self->statement->st, i));
|
||||
} else if (coltype == SQLITE_TEXT) {
|
||||
|
@ -558,7 +558,7 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* args)
|
|||
Py_BEGIN_ALLOW_THREADS
|
||||
lastrowid = sqlite3_last_insert_rowid(self->connection->db);
|
||||
Py_END_ALLOW_THREADS
|
||||
self->lastrowid = _pysqlite_long_from_int64(lastrowid);
|
||||
self->lastrowid = PyLong_FromLongLong(lastrowid);
|
||||
}
|
||||
|
||||
if (rc == SQLITE_ROW) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue