Opened 15 years ago

Closed 15 years ago

#1246 closed Bugs (fixed)

breakage in boost::python svn trunk

Reported by: ndbecker2@… Owned by: Nikolay Mladenov
Milestone: To Be Determined Component: python USE GITHUB
Version: Boost Development Trunk Severity: Showstopper
Keywords: Cc: rwgk@…

Description

New python function sig code breaks this test case (gcc-4.1.2):

#include <boost/shared_ptr.hpp> #include <boost/python/module.hpp> #include <boost/python/def.hpp> #include <boost/python/class.hpp> #include <boost/python/init.hpp>

using namespace boost::python;

struct base {}; struct concrete : public base {};

struct Test {

Test (boost::shared_ptr<base> _x) : x (_x) {} boost::shared_ptr<base> x;

};

BOOST_PYTHON_MODULE(test1) {

class_<base, boost::noncopyable> ("base", "abstract", no_init); class_<concrete, bases<base> > ("concrete", "concrete"); class_<Test> ("Test", init<boost::shared_ptr<base> >())

.def_readonly ("x", &Test::x, "x") <<<< this seems to trigger the error

;

}

g++ -o mod/test1.os -c -g -DBOOST_DISABLE_THREADS -O3 -ftree-vectorize -fstrict-aliasing -ffast-math -DNDEBUG -Wall -fPIC -Isrc -I/usr/local/src/boost.hg -I/usr/include/python2.5 mod/test1.cc /usr/local/src/boost.hg/boost/python/to_python_value.hpp: In member function 'const PyTypeObject* boost::python::detail::shared_ptr_to_python_value<T>::get_pytype() const [with T = boost::shared_ptr<base>&]': /usr/local/src/boost.hg/boost/python/detail/caller.hpp:102: instantiated from 'static const PyTypeObject* boost::python::detail::converter_target_type<ResultConverter>::get_pytype() [with ResultConverter = boost::python::to_python_value<boost::shared_ptr<base>&>]' /usr/local/src/boost.hg/boost/python/detail/caller.hpp:242: instantiated from 'static boost::python::detail::py_func_sig_info boost::python::detail::caller_arity<1u>::impl<F, Policies, Sig>::signature() [with F = boost::python::detail::member<boost::shared_ptr<base>, Test>, Policies = boost::python::return_value_policy<boost::python::return_by_value, boost::python::default_call_policies>, Sig = boost::mpl::vector2<boost::shared_ptr<base>&, Test&>]' /usr/local/src/boost.hg/boost/python/object/py_function.hpp:48: instantiated from 'boost::python::detail::py_func_sig_info boost::python::objects::caller_py_function_impl<Caller>::signature() const [with Caller = boost::python::detail::caller<boost::python::detail::member<boost::shared_ptr<base>, Test>, boost::python::return_value_policy<boost::python::return_by_value, boost::python::default_call_policies>, boost::mpl::vector2<boost::shared_ptr<base>&, Test&> >]' mod/test1.cc:22: instantiated from here /usr/local/src/boost.hg/boost/python/to_python_value.hpp:109: error: no matching function for call to 'boost::python::detail::shared_ptr_to_python_value<boost::shared_ptr<base>&>::get_pytype(boost::type<boost::shared_ptr<base>&>*) const' /usr/local/src/boost.hg/boost/python/to_python_value.hpp:109: note: candidates are: const PyTypeObject* boost::python::detail::shared_ptr_to_python_value<T>::get_pytype() const [with T = boost::shared_ptr<base>&] scons: * [mod/test1.os] Error 1 scons: building terminated because of errors.

Compilation exited abnormally with code 2 at Wed Sep 12 07:18:15

Change History (4)

comment:1 by Dave Abrahams, 15 years ago

Cc: rwgk@… added

I think Ralf is responsible for these changes. Ralf, please enter all your settings at http://svn.boost.org/trac/boost/settings as described at WikiStart#GettingaTracSVNUserid so that tickets can be assigned to you, and reassign this ticket to yourself!

comment:2 by Ralf W. Grosse-Kunstleve <rwgk@…>, 15 years ago

This is most likely related to Nikolay Mladenov's changes from early September. I just alerted him to this issue. Ralf

comment:3 by Nikolay Mladenov, 15 years ago

Owner: changed from Dave Abrahams to Nikolay Mladenov

comment:4 by Nikolay Mladenov, 15 years ago

Resolution: fixed
Status: newclosed

fixed in revision 39223

Note: See TracTickets for help on using tickets.