[C++-sig] Problems with virtualness and py++

Pertti Kellomäki pertti.kellomaki at tut.fi
Mon Sep 21 08:29:52 CEST 2009


Hi Roman,

> Can you try revision:
> http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1757&view=rev ?
> 
> I believe the bug is fixed and new issues were not introduced :-)

There is a small snag still:

virtual_const_bindings.cpp:27: virhe: ”result” declared as reference
but not initialized

This comes from the following piece of code:

     static boost::python::object default_h( ::B & inst, ::A & x ){
         C & result;
         if( dynamic_cast< B_wrapper * >( boost::addressof( inst ) ) ){
             result = inst.::B::h(x);
         }
         else{
             result = inst.h(x);
         }
         typedef bp::return_internal_reference< > call_policies_t;
         return bp::object( pyplusplus::call_policies::make_object< 
call_policies_t, ::C & >( result ) );
     }
-- 
Pertti



More information about the Cplusplus-sig mailing list