mirror of
https://github.com/boostorg/python.git
synced 2026-01-24 06:02:14 +00:00
boost/python, libs/python: all changes from trunk merged into branches/release
[SVN r56806]
This commit is contained in:
@@ -96,7 +96,12 @@ BOOST_PYTHON_DECL void* rvalue_from_python_stage2(
|
||||
if (!data.convertible)
|
||||
{
|
||||
handle<> msg(
|
||||
::PyString_FromFormat(
|
||||
#if PY_VERSION_HEX >= 0x03000000
|
||||
::PyUnicode_FromFormat
|
||||
#else
|
||||
::PyString_FromFormat
|
||||
#endif
|
||||
(
|
||||
"No registered converter was able to produce a C++ rvalue of type %s from this Python object of type %s"
|
||||
, converters.target_type.name()
|
||||
, source->ob_type->tp_name
|
||||
@@ -196,7 +201,12 @@ namespace
|
||||
void throw_no_lvalue_from_python(PyObject* source, registration const& converters, char const* ref_type)
|
||||
{
|
||||
handle<> msg(
|
||||
::PyString_FromFormat(
|
||||
#if PY_VERSION_HEX >= 0x03000000
|
||||
::PyUnicode_FromFormat
|
||||
#else
|
||||
::PyString_FromFormat
|
||||
#endif
|
||||
(
|
||||
"No registered converter was able to extract a C++ %s to type %s"
|
||||
" from this Python object of type %s"
|
||||
, ref_type
|
||||
@@ -218,7 +228,12 @@ namespace
|
||||
if (source->ob_refcnt <= 1)
|
||||
{
|
||||
handle<> msg(
|
||||
::PyString_FromFormat(
|
||||
#if PY_VERSION_HEX >= 0x3000000
|
||||
::PyUnicode_FromFormat
|
||||
#else
|
||||
::PyString_FromFormat
|
||||
#endif
|
||||
(
|
||||
"Attempt to return dangling %s to object of type: %s"
|
||||
, ref_type
|
||||
, converters.target_type.name()));
|
||||
|
||||
Reference in New Issue
Block a user