Skip to content

Commit

Permalink
also depend on spatialite_init_ex() in pyspatialite (followup 252aaab
Browse files Browse the repository at this point in the history
…andd4b72a2)
jef-n committed May 27, 2015
1 parent 9e59b6e commit c7cb963
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions python/ext-libs/pyspatialite/src/connection.c
Original file line number Diff line number Diff line change
@@ -106,13 +106,13 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
}

Py_BEGIN_ALLOW_THREADS
#if defined(SPATIALITE_VERSION_GE_4_0_0)
#if defined(SPATIALITE_HAS_INIT_EX)
self->slconn = spatialite_alloc_connection();
#else
spatialite_init( 0 );
#endif
rc = sqlite3_open(PyString_AsString(database_utf8), &self->db);
#if defined(SPATIALITE_VERSION_GE_4_0_0)
#if defined(SPATIALITE_HAS_INIT_EX)
spatialite_init_ex( self->db, self->slconn, 0 );
#endif
Py_END_ALLOW_THREADS
@@ -280,7 +280,7 @@ void pysqlite_connection_dealloc(pysqlite_Connection* self)
if (self->db) {
Py_BEGIN_ALLOW_THREADS
sqlite3_close(self->db);
#if defined(SPATIALITE_VERSION_GE_4_0_0)
#if defined(SPATIALITE_HAS_INIT_EX)
spatialite_cleanup_ex( self->slconn );
#endif
Py_END_ALLOW_THREADS
@@ -383,7 +383,7 @@ PyObject* pysqlite_connection_close(pysqlite_Connection* self, PyObject* args)
} else {
Py_BEGIN_ALLOW_THREADS
rc = sqlite3_close(self->db);
#if defined(SPATIALITE_VERSION_GE_4_0_0)
#if defined(SPATIALITE_HAS_INIT_EX)
spatialite_cleanup_ex( self->slconn );
#endif
Py_END_ALLOW_THREADS
2 changes: 1 addition & 1 deletion src/core/qgsslconnect.cpp
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
#include <sqlite3.h>
#include <spatialite.h>

#if defined(SPATIALITE_VERSION_GE_4_0_0)
#if defined(SPATIALITE_HAS_INIT_EX)
QHash<sqlite3 *, void *> QgsSLConnect::mSLconns;
#endif

0 comments on commit c7cb963

Please sign in to comment.