diff options
author | Larry Hastings <larry@hastings.org> | 2016-06-13 03:26:28 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2016-06-13 03:26:28 (GMT) |
commit | 29f963732166260420ffbdebe9eb8b98a009dc8c (patch) | |
tree | 17ad6530ee3b66b53647ab70bac08145dcd69783 /Modules/_sqlite | |
parent | 6e9a96be9e24265638df8aa600e566b306a23a2b (diff) | |
parent | 1003b34c71d53ccb88ae2768aaba503ae6b5bc16 (diff) | |
download | cpython-29f963732166260420ffbdebe9eb8b98a009dc8c.zip cpython-29f963732166260420ffbdebe9eb8b98a009dc8c.tar.gz cpython-29f963732166260420ffbdebe9eb8b98a009dc8c.tar.bz2 |
Merge 3.5.2rc1 with current 3.5 branch.
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r-- | Modules/_sqlite/connection.c | 4 | ||||
-rw-r--r-- | Modules/_sqlite/module.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 7570624..6aa4764 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -164,6 +164,10 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject #ifdef WITH_THREAD self->thread_ident = PyThread_get_thread_ident(); #endif + if (!check_same_thread && sqlite3_libversion_number() < 3003001) { + PyErr_SetString(pysqlite_NotSupportedError, "shared connections not available"); + return -1; + } self->check_same_thread = check_same_thread; self->function_pinboard = PyDict_New(); diff --git a/Modules/_sqlite/module.h b/Modules/_sqlite/module.h index b51724b..0fb5a55 100644 --- a/Modules/_sqlite/module.h +++ b/Modules/_sqlite/module.h @@ -42,7 +42,7 @@ extern PyObject* pysqlite_NotSupportedError; extern PyObject* time_time; extern PyObject* time_sleep; -/* A dictionary, mapping colum types (INTEGER, VARCHAR, etc.) to converter +/* A dictionary, mapping column types (INTEGER, VARCHAR, etc.) to converter * functions, that convert the SQL value to the appropriate Python value. * The key is uppercase. */ |