2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-31 08:22:18 +00:00

boost.python: merging trunk to release

[SVN r81773]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2012-12-07 19:51:06 +00:00
parent 46796f3413
commit a3f478e9af

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;