Skip to content

Commit 9d5e8b9

Browse files
committed
Bug fix
[SVN r14495]
1 parent bd72ee9 commit 9d5e8b9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/converter/from_python.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ namespace boost { namespace python { namespace converter {
2929
// type T. Indicates a successful lvalue conversion
3030
//
3131
// 3. where y is of type rvalue_from_python_data<T>,
32-
// x.construct(source, y) attempts to construct an object of type T
33-
// in y. Indicates an rvalue converter was found
32+
// x.construct(source, y) constructs an object of type T
33+
// in y.storage.bytes and then sets y.convertible == y.storage.bytes,
34+
// or else throws an exception and has no effect.
3435
BOOST_PYTHON_DECL rvalue_from_python_stage1_data rvalue_from_python_stage1(
3536
PyObject* source
3637
, registration const& converters)
@@ -231,7 +232,7 @@ pytype_result_from_python(PyTypeObject* type_, PyObject* source)
231232
handle<> msg(
232233
::PyString_FromFormat(
233234
"Expecting a Python %s return type, but got an object of type %s instead"
234-
, type_
235+
, type_->tp_name
235236
, source->ob_type->tp_name
236237
));
237238
PyErr_SetObject(PyExc_TypeError, msg.get());

0 commit comments

Comments
 (0)