fix compile with older boost - fixes #1007

This commit is contained in:
Dane Springmeyer 2012-01-05 16:45:12 -08:00
parent faaa4f6e3f
commit 94ae30d7a2

View file

@ -89,9 +89,9 @@ inline std::string boost_version()
return s.str();
}
#if BOOST_VERSION >= 104700
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);
return
#if PY_VERSION_HEX >= 0x03000000
@ -100,16 +100,19 @@ PyObject* to_wkb( geometry_type const& geom, mapnik::util::wkbByteOrder byte_ord
::PyString_FromStringAndSize
#endif
((const char*)wkb->buffer(),wkb->size());
}
#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 "
+ boost_version());
#endif
}
#endif
#if BOOST_VERSION >= 104700
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);
return
#if PY_VERSION_HEX >= 0x03000000
@ -118,11 +121,14 @@ PyObject* to_wkb2( path_type const& p, mapnik::util::wkbByteOrder byte_order)
::PyString_FromStringAndSize
#endif
((const char*)wkb->buffer(),wkb->size());
}
#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 "
+ boost_version());
#endif
}
#endif
std::string to_wkt( geometry_type const& geom)