diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-10-30 13:04:36 -0700 |
---|---|---|
committer | MyoungJune Park <mj2004.park@samsung.com> | 2016-04-07 11:32:15 +0900 |
commit | a58139bc5ac7fadb345afb223480c55b2dc48e5d (patch) | |
tree | 043bc4d98675221be8aad7ea423870c26f52599f /libs/python/src/str.cpp | |
parent | 733b5d5ae2c5d625211e2985ac25728ac3f54883 (diff) | |
download | boost-a58139bc5ac7fadb345afb223480c55b2dc48e5d.tar.gz boost-a58139bc5ac7fadb345afb223480c55b2dc48e5d.tar.bz2 boost-a58139bc5ac7fadb345afb223480c55b2dc48e5d.zip |
Bump to 1.58.0
Change-Id: I4e995274977bc86779ba1d39848bc087054a197c
Signed-off-by: MyoungJune Park <mj2004.park@samsung.com>
Diffstat (limited to 'libs/python/src/str.cpp')
-rw-r--r-- | libs/python/src/str.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/python/src/str.cpp b/libs/python/src/str.cpp index 0bc225aa22..1b7e59cd9b 100644 --- a/libs/python/src/str.cpp +++ b/libs/python/src/str.cpp @@ -9,14 +9,14 @@ namespace boost { namespace python { namespace detail { detail::new_reference str_base::call(object const& arg_) { - return (detail::new_reference)PyObject_CallFunction( #if PY_VERSION_HEX >= 0x03000000 - (PyObject*)&PyUnicode_Type, + union { PyTypeObject *ptop; PyObject *pop; }pun = { &PyUnicode_Type }; #else - (PyObject*)&PyString_Type, + union { PyTypeObject *ptop; PyObject *pop; }pun = { &PyString_Type }; #endif - const_cast<char*>("(O)"), - arg_.ptr()); + + return (detail::new_reference)PyObject_CallFunction( + pun.pop, const_cast<char*>("(O)"), arg_.ptr()); } str_base::str_base() |