[C++-sig] call_back and inheritance

J. Michael Owen mikeowen at llnl.gov
Fri Aug 2 20:21:25 CEST 2002

I'm running into a problem trying to use the call_back class idiom for exposing
virtual functions of classes for overriding from python.  The problem occurs
when I have a class with virtual functions I want to expose this way, which
inherits from another class that also has virtual functions and a corresponding
call_back class to expose its methods.  When I do the obvious thing and write a
call_back class for this derived class, everything compiles OK but I get a
runtime SEGV when I try to use these methods.  I'm including an example code and
python script to exercise the problem -- is this a bug or just user error?

Mike Owen.

 "Hey...where are the sunflower seeds?" |       J. Michael Owen         
        o_o /                           |       Phone:  925-423-7160     
        (")                             |       Email:  mikeowen at llnl.gov
       \/'\/                            |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: callback.tar
Type: application/x-tar
Size: 10240 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20020802/8d459769/attachment.tar>

More information about the Cplusplus-sig mailing list