fix compile with python >=3
This commit is contained in:
parent
27d8cef3c4
commit
b479de9e96
1 changed files with 5 additions and 1 deletions
|
@ -120,7 +120,11 @@ PyObject * get_buffer_size(mapnik::layer & l)
|
||||||
boost::optional<int> buffer_size = l.buffer_size();
|
boost::optional<int> buffer_size = l.buffer_size();
|
||||||
if (buffer_size)
|
if (buffer_size)
|
||||||
{
|
{
|
||||||
|
#if PY_VERSION_HEX >= 0x03000000
|
||||||
|
return PyLong_FromLong(*buffer_size);
|
||||||
|
#else
|
||||||
return PyInt_FromLong(*buffer_size);
|
return PyInt_FromLong(*buffer_size);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue