summaryrefslogtreecommitdiff
path: root/cpp/include/qpid
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2013-09-06 11:55:38 +0000
committerGordon Sim <gsim@apache.org>2013-09-06 11:55:38 +0000
commitb42f2aebd1ebfd6b64bea4e49e14630debb08824 (patch)
treee9b317f8e3b97f74a37bc69d181f5110030b662b /cpp/include/qpid
parent96421d198d90d4fb355fb4314ada1a378f2303f5 (diff)
downloadqpid-python-b42f2aebd1ebfd6b64bea4e49e14630debb08824.tar.gz
QPID-5104: fix for python 2.4
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1520552 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/include/qpid')
-rw-r--r--cpp/include/qpid/swig_python_typemaps.i2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/include/qpid/swig_python_typemaps.i b/cpp/include/qpid/swig_python_typemaps.i
index ef32012693..9d44a1e1ef 100644
--- a/cpp/include/qpid/swig_python_typemaps.i
+++ b/cpp/include/qpid/swig_python_typemaps.i
@@ -122,7 +122,7 @@ typedef int Py_ssize_t;
case qpid::types::VAR_STRING : {
const std::string val(v->asString());
if (v->getEncoding() == "utf8")
- result = PyUnicode_FromStringAndSize(val.c_str(), val.size());
+ result = PyUnicode_DecodeUTF8(val.c_str(), val.size(), NULL);
else
result = PyString_FromStringAndSize(val.c_str(), val.size());
break;