Replace _pysqlite_long_from_int64() with PyLong_FromLongLong() (GH-16882)

This commit is contained in:
Sergey Fedoseev 2019-10-23 13:09:01 +05:00 committed by Serhiy Storchaka
parent ea6041cd7f
commit b6f5b9dd21
4 changed files with 3 additions and 20 deletions

View file

@ -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) {