|
Multiple inheritance with perl 5.6.1: msg#00179programming.swig
Hi, I seem to have a problem with multiple inheritance in perl (5.6.1) on Linux. I have included some sample code that illustrates the problem. Essentially, when the perl is run, the following is output foo foo foo bar I have tested the same code with TCL, and do not see the same problem. Best Tony ps gcc is 2.96, swig 1.3.21 ----------------------------------------------------------------- fooBar.h -------- #include <iostream> class Bar { public: virtual void bar(){std::cout << "bar" << endl;} }; class Foo { public: virtual void foo(){std::cout << "foo" << endl;} }; class FooBar : public Foo, public Bar { public: virtual void fooBar(){std::cout << "foo bar" << endl;} }; example.pl ---------- use example; $fooBar = new example::FooBar(); $fooBar->foo(); $fooBar->bar(); $fooBar->fooBar(); > outputs foo foo foo bar example.tcl ----------- catch { load ./example[info sharedlibextension] example} FooBar c c foo c bar c fooBar > outputs foo bar foo bar main.cxx -------- #include "fooBar.h" void main() { FooBar *fooBar = new FooBar(); fooBar->foo(); fooBar->bar(); fooBar->fooBar(); } > outputs foo bar foo bar Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: SWIG_ConvertPtrFromString bug in SWIG 1.3.20 & 1.3.21: 00179, Abhinandan Jain |
|---|---|
| Next by Date: | Re: SWIG_ConvertPtrFromString bug in SWIG 1.3.20 & 1.3.21: 00179, Rahul Shinde |
| Previous by Thread: | SWIG_ConvertPtrFromString bug in SWIG 1.3.20 & 1.3.21i: 00179, Abhinandan Jain |
| Next by Thread: | Re: Multiple inheritance with perl 5.6.1: 00179, Fandiņo |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |