mapnik/osx/patches/boost_python3k_bytes.diff

14 lines
675 B
Diff

Index: libs/python/src/converter/builtin_converters.cpp
===================================================================
--- libs/python/src/converter/builtin_converters.cpp (revision 67415)
+++ libs/python/src/converter/builtin_converters.cpp (working copy)
@@ -375,7 +375,8 @@
static unaryfunc* get_slot(PyObject* obj)
{
#if PY_VERSION_HEX >= 0x03000000
- return (PyUnicode_Check(obj)) ? &py_unicode_as_string_unaryfunc : 0;
+ return (PyUnicode_Check(obj)) ? &py_unicode_as_string_unaryfunc :
+ PyBytes_Check(obj) ? &py_object_identity : 0;
#else
return (PyString_Check(obj)) ? &obj->ob_type->tp_str : 0;