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

Roman Yakovenko roman.yakovenko at gmail.com
Mon Sep 21 12:21:50 CEST 2009


2009/9/21 Pertti Kellomäki <pertti.kellomaki at tut.fi>:
> 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 ) );
>    }


:-(. I will take a look on it.


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/


More information about the Cplusplus-sig mailing list