Ensure sqlite3_initialize() called during module setup.
This commit is contained in:
parent
397e251458
commit
e1bc4d9669
1 changed files with 6 additions and 0 deletions
|
|
@ -438,6 +438,12 @@ PyMODINIT_FUNC PyInit__sqlite3(void)
|
||||||
PyObject *tmp_obj;
|
PyObject *tmp_obj;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
int rc = sqlite3_initialize();
|
||||||
|
if (rc != SQLITE_OK) {
|
||||||
|
PyErr_SetString(PyExc_ImportError, sqlite3_errstr(rc));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
module = PyModule_Create(&_sqlite3module);
|
module = PyModule_Create(&_sqlite3module);
|
||||||
|
|
||||||
if (!module ||
|
if (!module ||
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue