2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-30 20:12:37 +00:00

applying patch from trac ticket 4609

[SVN r79774]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2012-07-27 22:43:32 +00:00
parent 2c1a276671
commit 303885fefa

View File

@@ -377,7 +377,8 @@ namespace
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;