diff options
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r-- | Modules/_sqlite/util.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/Modules/_sqlite/util.c b/Modules/_sqlite/util.c index 312fe3b..a276dad 100644 --- a/Modules/_sqlite/util.c +++ b/Modules/_sqlite/util.c @@ -113,7 +113,6 @@ int _pysqlite_seterror(sqlite3* db, sqlite3_stmt* st) PyObject * _pysqlite_long_from_int64(sqlite_int64 value) { -#ifdef HAVE_LONG_LONG # if SIZEOF_LONG_LONG < 8 if (value > PY_LLONG_MAX || value < PY_LLONG_MIN) { return _PyLong_FromByteArray(&value, sizeof(value), @@ -124,14 +123,6 @@ _pysqlite_long_from_int64(sqlite_int64 value) if (value > LONG_MAX || value < LONG_MIN) return PyLong_FromLongLong(value); # endif -#else -# if SIZEOF_LONG < 8 - if (value > LONG_MAX || value < LONG_MIN) { - return _PyLong_FromByteArray(&value, sizeof(value), - IS_LITTLE_ENDIAN, 1 /* signed */); - } -# endif -#endif return PyLong_FromLong(Py_SAFE_DOWNCAST(value, sqlite_int64, long)); } @@ -139,23 +130,13 @@ sqlite_int64 _pysqlite_long_as_int64(PyObject * py_val) { int overflow; -#ifdef HAVE_LONG_LONG PY_LONG_LONG value = PyLong_AsLongLongAndOverflow(py_val, &overflow); -#else - long value = PyLong_AsLongAndOverflow(py_val, &overflow); -#endif if (value == -1 && PyErr_Occurred()) return -1; if (!overflow) { -#ifdef HAVE_LONG_LONG # if SIZEOF_LONG_LONG > 8 if (-0x8000000000000000LL <= value && value <= 0x7FFFFFFFFFFFFFFFLL) # endif -#else -# if SIZEOF_LONG > 8 - if (-0x8000000000000000L <= value && value <= 0x7FFFFFFFFFFFFFFFL) -# endif -#endif return value; } else if (sizeof(value) < sizeof(sqlite_int64)) { |