Skip to content

Commit c7cb963

Browse files
committed
also depend on spatialite_init_ex() in pyspatialite (followup 252aaab andd4b72a2)
1 parent 9e59b6e commit c7cb963

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

python/ext-libs/pyspatialite/src/connection.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
106106
}
107107

108108
Py_BEGIN_ALLOW_THREADS
109-
#if defined(SPATIALITE_VERSION_GE_4_0_0)
109+
#if defined(SPATIALITE_HAS_INIT_EX)
110110
self->slconn = spatialite_alloc_connection();
111111
#else
112112
spatialite_init( 0 );
113113
#endif
114114
rc = sqlite3_open(PyString_AsString(database_utf8), &self->db);
115-
#if defined(SPATIALITE_VERSION_GE_4_0_0)
115+
#if defined(SPATIALITE_HAS_INIT_EX)
116116
spatialite_init_ex( self->db, self->slconn, 0 );
117117
#endif
118118
Py_END_ALLOW_THREADS
@@ -280,7 +280,7 @@ void pysqlite_connection_dealloc(pysqlite_Connection* self)
280280
if (self->db) {
281281
Py_BEGIN_ALLOW_THREADS
282282
sqlite3_close(self->db);
283-
#if defined(SPATIALITE_VERSION_GE_4_0_0)
283+
#if defined(SPATIALITE_HAS_INIT_EX)
284284
spatialite_cleanup_ex( self->slconn );
285285
#endif
286286
Py_END_ALLOW_THREADS
@@ -383,7 +383,7 @@ PyObject* pysqlite_connection_close(pysqlite_Connection* self, PyObject* args)
383383
} else {
384384
Py_BEGIN_ALLOW_THREADS
385385
rc = sqlite3_close(self->db);
386-
#if defined(SPATIALITE_VERSION_GE_4_0_0)
386+
#if defined(SPATIALITE_HAS_INIT_EX)
387387
spatialite_cleanup_ex( self->slconn );
388388
#endif
389389
Py_END_ALLOW_THREADS

src/core/qgsslconnect.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <sqlite3.h>
1919
#include <spatialite.h>
2020

21-
#if defined(SPATIALITE_VERSION_GE_4_0_0)
21+
#if defined(SPATIALITE_HAS_INIT_EX)
2222
QHash<sqlite3 *, void *> QgsSLConnect::mSLconns;
2323
#endif
2424

0 commit comments

Comments
 (0)