mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-04 00:04:03 -04:00
Fix python3 pyspatialite import
This commit is contained in:
parent
49e64ab3fb
commit
34588f3f8c
@ -50,7 +50,10 @@ def TimestampFromTicks(ticks):
|
||||
version_info = tuple([int(x) for x in version.split(".")])
|
||||
sqlite_version_info = tuple([int(x) for x in sqlite_version.split(".")])
|
||||
|
||||
Binary = buffer
|
||||
# buffer is no longer supported is python 3
|
||||
# memoryview fit 2.7 and 3+
|
||||
# see https://docs.python.org/2/c-api/buffer.html
|
||||
Binary = memoryview
|
||||
|
||||
def register_adapters_and_converters():
|
||||
def adapt_date(val):
|
||||
|
@ -329,7 +329,11 @@ static struct PyModuleDef _sqlite3module = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
PyMODINIT_FUNC init_spatialite(void)
|
||||
#else
|
||||
PyMODINIT_FUNC PyInit__spatialite(void)
|
||||
#endif
|
||||
{
|
||||
PyObject *module, *dict;
|
||||
PyObject *tmp_obj;
|
||||
|
Loading…
x
Reference in New Issue
Block a user