summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-04-28 11:11:55 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-04-28 11:11:55 (GMT)
commit5f99fa728760588f1e11c37db25b54fd3cde2560 (patch)
treea93677f9d759026a4cb96c80cafb488436063376 /Modules
parent1f6ee73c1e6338ff9494dea5a5473d9266eb66f5 (diff)
parentd160b12292be2f7eeb824cc4b2b6d1d84dbf8b1a (diff)
downloadcpython-5f99fa728760588f1e11c37db25b54fd3cde2560.zip
cpython-5f99fa728760588f1e11c37db25b54fd3cde2560.tar.gz
cpython-5f99fa728760588f1e11c37db25b54fd3cde2560.tar.bz2
Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3,
such as was shipped with Centos 5 and Mac OS X 10.4.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_sqlite/cursor.c2
-rw-r--r--Modules/_sqlite/util.c8
-rw-r--r--Modules/_sqlite/util.h4
3 files changed, 7 insertions, 7 deletions
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
index 1005d88..4999415 100644
--- a/Modules/_sqlite/cursor.c
+++ b/Modules/_sqlite/cursor.c
@@ -701,7 +701,7 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
Py_DECREF(self->lastrowid);
if (!multiple && statement_type == STATEMENT_INSERT) {
- sqlite3_int64 lastrowid;
+ sqlite_int64 lastrowid;
Py_BEGIN_ALLOW_THREADS
lastrowid = sqlite3_last_insert_rowid(self->connection->db);
Py_END_ALLOW_THREADS
diff --git a/Modules/_sqlite/util.c b/Modules/_sqlite/util.c
index a1a462c..d88bc3f 100644
--- a/Modules/_sqlite/util.c
+++ b/Modules/_sqlite/util.c
@@ -111,7 +111,7 @@ int _pysqlite_seterror(sqlite3* db, sqlite3_stmt* st)
#endif
PyObject *
-_pysqlite_long_from_int64(sqlite3_int64 value)
+_pysqlite_long_from_int64(sqlite_int64 value)
{
#ifdef HAVE_LONG_LONG
# if SIZEOF_LONG_LONG < 8
@@ -135,7 +135,7 @@ _pysqlite_long_from_int64(sqlite3_int64 value)
return PyLong_FromLong(value);
}
-sqlite3_int64
+sqlite_int64
_pysqlite_long_as_int64(PyObject * py_val)
{
int overflow;
@@ -158,8 +158,8 @@ _pysqlite_long_as_int64(PyObject * py_val)
#endif
return value;
}
- else if (sizeof(value) < sizeof(sqlite3_int64)) {
- sqlite3_int64 int64val;
+ else if (sizeof(value) < sizeof(sqlite_int64)) {
+ sqlite_int64 int64val;
if (_PyLong_AsByteArray((PyLongObject *)py_val,
(unsigned char *)&int64val, sizeof(int64val),
IS_LITTLE_ENDIAN, 1 /* signed */) >= 0) {
diff --git a/Modules/_sqlite/util.h b/Modules/_sqlite/util.h
index ca02149..88ea906 100644
--- a/Modules/_sqlite/util.h
+++ b/Modules/_sqlite/util.h
@@ -36,7 +36,7 @@ int pysqlite_step(sqlite3_stmt* statement, pysqlite_Connection* connection);
*/
int _pysqlite_seterror(sqlite3* db, sqlite3_stmt* st);
-PyObject * _pysqlite_long_from_int64(sqlite3_int64 value);
-sqlite3_int64 _pysqlite_long_as_int64(PyObject * value);
+PyObject * _pysqlite_long_from_int64(sqlite_int64 value);
+sqlite_int64 _pysqlite_long_as_int64(PyObject * value);
#endif