summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite/util.c
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2019-10-23 08:09:01 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2019-10-23 08:09:01 (GMT)
commitb6f5b9dd21a37fa97af38521941025259f1556e0 (patch)
tree5759dca4eca74ae52cd054215a3e19640ed1dbe3 /Modules/_sqlite/util.c
parentea6041cd7ff0d752296d1759927eff898ceba864 (diff)
downloadcpython-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/util.c')
-rw-r--r--Modules/_sqlite/util.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/Modules/_sqlite/util.c b/Modules/_sqlite/util.c
index 3fa671d..1dbabcd 100644
--- a/Modules/_sqlite/util.c
+++ b/Modules/_sqlite/util.c
@@ -103,22 +103,6 @@ int _pysqlite_seterror(sqlite3* db, sqlite3_stmt* st)
# define IS_LITTLE_ENDIAN 1
#endif
-PyObject *
-_pysqlite_long_from_int64(sqlite_int64 value)
-{
-# if SIZEOF_LONG_LONG < 8
- if (value > PY_LLONG_MAX || value < PY_LLONG_MIN) {
- return _PyLong_FromByteArray(&value, sizeof(value),
- IS_LITTLE_ENDIAN, 1 /* signed */);
- }
-# endif
-# if SIZEOF_LONG < SIZEOF_LONG_LONG
- if (value > LONG_MAX || value < LONG_MIN)
- return PyLong_FromLongLong(value);
-# endif
- return PyLong_FromLong(Py_SAFE_DOWNCAST(value, sqlite_int64, long));
-}
-
sqlite_int64
_pysqlite_long_as_int64(PyObject * py_val)
{