From 9d5e8b9ad801c8766bca82d96d84aea453863545 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Wed, 17 Jul 2002 14:06:15 +0000 Subject: [PATCH] Bug fix [SVN r14495] --- src/converter/from_python.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/converter/from_python.cpp b/src/converter/from_python.cpp index 30c31f4f..bac7f2f7 100644 --- a/src/converter/from_python.cpp +++ b/src/converter/from_python.cpp @@ -29,8 +29,9 @@ namespace boost { namespace python { namespace converter { // type T. Indicates a successful lvalue conversion // // 3. where y is of type rvalue_from_python_data, -// x.construct(source, y) attempts to construct an object of type T -// in y. Indicates an rvalue converter was found +// x.construct(source, y) constructs an object of type T +// in y.storage.bytes and then sets y.convertible == y.storage.bytes, +// or else throws an exception and has no effect. BOOST_PYTHON_DECL rvalue_from_python_stage1_data rvalue_from_python_stage1( PyObject* source , registration const& converters) @@ -231,7 +232,7 @@ pytype_result_from_python(PyTypeObject* type_, PyObject* source) handle<> msg( ::PyString_FromFormat( "Expecting a Python %s return type, but got an object of type %s instead" - , type_ + , type_->tp_name , source->ob_type->tp_name )); PyErr_SetObject(PyExc_TypeError, msg.get());