Skip to content
Permalink
Browse files
also depend on spatialite_init_ex() in pyspatialite (followup 252aaab
…andd4b72a2)
  • Loading branch information
jef-n committed May 27, 2015
1 parent 9e59b6e commit c7cb963ac7a02a7e086a084a32d93a2cb1b93990
Showing with 5 additions and 5 deletions.
  1. +4 −4 python/ext-libs/pyspatialite/src/connection.c
  2. +1 −1 src/core/qgsslconnect.cpp
@@ -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
@@ -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.