diff options
author | Sergey Fedoseev <fedoseev.sergey@gmail.com> | 2019-10-23 08:09:01 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2019-10-23 08:09:01 (GMT) |
commit | b6f5b9dd21a37fa97af38521941025259f1556e0 (patch) | |
tree | 5759dca4eca74ae52cd054215a3e19640ed1dbe3 /Modules/_sqlite/cursor.c | |
parent | ea6041cd7ff0d752296d1759927eff898ceba864 (diff) | |
download | cpython-b6f5b9dd21a37fa97af38521941025259f1556e0.zip cpython-b6f5b9dd21a37fa97af38521941025259f1556e0.tar.gz cpython-b6f5b9dd21a37fa97af38521941025259f1556e0.tar.bz2 |
Replace _pysqlite_long_from_int64() with PyLong_FromLongLong() (GH-16882)
Diffstat (limited to 'Modules/_sqlite/cursor.c')
-rw-r--r-- | Modules/_sqlite/cursor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 6d9685b..45f5865 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -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) { |