Skip to content

Commit 5171e63

Browse files
committed
fix: use PyLong_AsLong instead of PyLong_AsLongLong for Mapnik 4.x compatibility
1 parent 9763b8d commit 5171e63

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/mapnik_value_converter.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct value_converter
3636
{
3737
PyObject * operator() (mapnik::value_integer val) const
3838
{
39-
return ::PyLong_FromLongLong(val);
39+
return ::PyLong_FromLong(val);
4040
}
4141

4242
PyObject * operator() (mapnik::value_double val) const
@@ -126,7 +126,7 @@ struct type_caster<mapnik::value>
126126
{
127127
PyObject *tmp = PyNumber_Long(source);
128128
if (!tmp) return false;
129-
value = PyLong_AsLongLong(tmp);
129+
value = PyLong_AsLong(tmp);
130130
Py_DecRef(tmp);
131131
return !PyErr_Occurred();
132132
}
@@ -180,7 +180,7 @@ struct type_caster<mapnik::value_holder>
180180
{
181181
PyObject *tmp = PyNumber_Long(source);
182182
if (!tmp) return false;
183-
value = PyLong_AsLongLong(tmp);
183+
value = PyLong_AsLong(tmp);
184184
Py_DecRef(tmp);
185185
return !PyErr_Occurred();
186186
}

0 commit comments

Comments
 (0)