File tree 2 files changed +8
-1
lines changed
python/ext-libs/pyspatialite
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,10 @@ def TimestampFromTicks(ticks):
50
50
version_info = tuple ([int (x ) for x in version .split ("." )])
51
51
sqlite_version_info = tuple ([int (x ) for x in sqlite_version .split ("." )])
52
52
53
- Binary = buffer
53
+ # buffer is no longer supported is python 3
54
+ # memoryview fit 2.7 and 3+
55
+ # see https://docs.python.org/2/c-api/buffer.html
56
+ Binary = memoryview
54
57
55
58
def register_adapters_and_converters ():
56
59
def adapt_date (val ):
Original file line number Diff line number Diff line change @@ -329,7 +329,11 @@ static struct PyModuleDef _sqlite3module = {
329
329
};
330
330
#endif
331
331
332
+ #if PY_MAJOR_VERSION < 3
332
333
PyMODINIT_FUNC init_spatialite (void )
334
+ #else
335
+ PyMODINIT_FUNC PyInit__spatialite (void )
336
+ #endif
333
337
{
334
338
PyObject * module , * dict ;
335
339
PyObject * tmp_obj ;
You can’t perform that action at this time.
0 commit comments