[C++-sig] Re: Making copy of function derived from C++ pure virtual function

Paul F. Kunz Paul_Kunz at slac.stanford.edu
Mon Dec 13 20:12:33 CET 2004


>>>>> On Mon, 13 Dec 2004 14:06:26 -0500, David Abrahams <dave at boost-consulting.com> said:

>> FunctionWrap * t = const_cast < FunctionWrap * > ( this );
>>  object self = get_owner ( t );
>> 
>> // Find its most-derived Python class object my_class =
>> self.attr("__class__");
>> 
>> // call the copy ctor through Python.  
>> py_result = my_class(self);

> Ahem.  Which line above and precisely which part of the expression
> on that line is being evaluated?

   The last line, my_class(self)

>> This probably doesn't help, but thought I mentioned it in case it
>> rings a bell.

> No bell-ringing.  The exception should be caught by Boost.Python and
> returned to Python as a Python exception.  Python isn't issuing any
> error message?

   No error message from Python.   Just silently returns a NULL
result.

P.S.

   I am trying to find a way to isolate the problem.



More information about the Cplusplus-sig mailing list