Skip to content
Permalink
Browse files
also spatialite_cleanup_ex conditional for spatialite >= 4
  • Loading branch information
blazek committed May 27, 2015
1 parent 9639fc6 commit 58f9372b3c73d04355ab60eaf2286802f8dc89e3
Showing with 4 additions and 0 deletions.
  1. +4 −0 python/ext-libs/pyspatialite/src/connection.c
@@ -280,7 +280,9 @@ 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)
spatialite_cleanup_ex( self->slconn );
#endif
Py_END_ALLOW_THREADS
} else if (self->apsw_connection) {
ret = PyObject_CallMethod(self->apsw_connection, "close", "");
@@ -381,7 +383,9 @@ 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)
spatialite_cleanup_ex( self->slconn );
#endif
Py_END_ALLOW_THREADS

if (rc != SQLITE_OK) {

0 comments on commit 58f9372

Please sign in to comment.