fix compile with python >=3

This commit is contained in:
Dane Springmeyer 2013-03-12 18:42:42 -07:00
parent 27d8cef3c4
commit b479de9e96

View file

@ -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
{ {