Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79774 - trunk/libs/python/src/converter
From: rwgk_at_[hidden]
Date: 2012-07-27 18:43:32


Author: rwgk
Date: 2012-07-27 18:43:32 EDT (Fri, 27 Jul 2012)
New Revision: 79774
URL: http://svn.boost.org/trac/boost/changeset/79774

Log:
applying patch from trac ticket 4609
Text files modified:
   trunk/libs/python/src/converter/builtin_converters.cpp | 3 ++-
   1 files changed, 2 insertions(+), 1 deletions(-)

Modified: trunk/libs/python/src/converter/builtin_converters.cpp
==============================================================================
--- trunk/libs/python/src/converter/builtin_converters.cpp (original)
+++ trunk/libs/python/src/converter/builtin_converters.cpp 2012-07-27 18:43:32 EDT (Fri, 27 Jul 2012)
@@ -377,7 +377,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;
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk