fix compile with older boost - fixes #1007
This commit is contained in:
parent
faaa4f6e3f
commit
94ae30d7a2
1 changed files with 10 additions and 4 deletions
|
@ -89,9 +89,9 @@ inline std::string boost_version()
|
||||||
return s.str();
|
return s.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if BOOST_VERSION >= 104700
|
||||||
PyObject* to_wkb( geometry_type const& geom, mapnik::util::wkbByteOrder byte_order)
|
PyObject* to_wkb( geometry_type const& geom, mapnik::util::wkbByteOrder byte_order)
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 104700
|
|
||||||
mapnik::util::wkb_buffer_ptr wkb = mapnik::util::to_wkb(geom,byte_order);
|
mapnik::util::wkb_buffer_ptr wkb = mapnik::util::to_wkb(geom,byte_order);
|
||||||
return
|
return
|
||||||
#if PY_VERSION_HEX >= 0x03000000
|
#if PY_VERSION_HEX >= 0x03000000
|
||||||
|
@ -100,16 +100,19 @@ PyObject* to_wkb( geometry_type const& geom, mapnik::util::wkbByteOrder byte_ord
|
||||||
::PyString_FromStringAndSize
|
::PyString_FromStringAndSize
|
||||||
#endif
|
#endif
|
||||||
((const char*)wkb->buffer(),wkb->size());
|
((const char*)wkb->buffer(),wkb->size());
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
|
PyObject* to_wkb( geometry_type const& geom)
|
||||||
|
{
|
||||||
throw std::runtime_error("mapnik::to_wkb() requires at least boost 1.47 while your build was compiled against boost "
|
throw std::runtime_error("mapnik::to_wkb() requires at least boost 1.47 while your build was compiled against boost "
|
||||||
+ boost_version());
|
+ boost_version());
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if BOOST_VERSION >= 104700
|
||||||
PyObject* to_wkb2( path_type const& p, mapnik::util::wkbByteOrder byte_order)
|
PyObject* to_wkb2( path_type const& p, mapnik::util::wkbByteOrder byte_order)
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 104700
|
|
||||||
mapnik::util::wkb_buffer_ptr wkb = mapnik::util::to_wkb(p,byte_order);
|
mapnik::util::wkb_buffer_ptr wkb = mapnik::util::to_wkb(p,byte_order);
|
||||||
return
|
return
|
||||||
#if PY_VERSION_HEX >= 0x03000000
|
#if PY_VERSION_HEX >= 0x03000000
|
||||||
|
@ -118,11 +121,14 @@ PyObject* to_wkb2( path_type const& p, mapnik::util::wkbByteOrder byte_order)
|
||||||
::PyString_FromStringAndSize
|
::PyString_FromStringAndSize
|
||||||
#endif
|
#endif
|
||||||
((const char*)wkb->buffer(),wkb->size());
|
((const char*)wkb->buffer(),wkb->size());
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
|
PyObject* to_wkb2( path_type const& p)
|
||||||
|
{
|
||||||
throw std::runtime_error("mapnik::to_wkb() requires at least boost 1.47 while your build was compiled against boost "
|
throw std::runtime_error("mapnik::to_wkb() requires at least boost 1.47 while your build was compiled against boost "
|
||||||
+ boost_version());
|
+ boost_version());
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
std::string to_wkt( geometry_type const& geom)
|
std::string to_wkt( geometry_type const& geom)
|
||||||
|
|
Loading…
Reference in a new issue