From: Andrea F. <in...@e-...> - 2010-11-10 13:52:59
|
Ok, this time I write an example, so it's easier to explain my problem. Here you can find the source code: http://www.e-nuts.net/bug.tar.gz ./build_me should build the example, just add extension=/path/to/compiled/Test.so to php.ini In that example there are two similar (simple) classes: SimpleClassFail : public SimpleVirtual // inherit from a virtual pure class SimpleClassWork : public SimpleNonVirtual // inherit from non-virtual class Both classes have a function getInner() that returns an instance of a SimpleClassReturn. SimpleClassWork returns it correctly SimpleClassFail return a wrong instance of SimpleClassFail (insted of SimpleClassReturn) You can test it running bug.php from console. main.cpp shows that code works fine in c++ Side question: trying this example in console using php5 bug.php it print: php5: symbol lookup error: /home/andrea/src/swig-bug/Test.so: undefined symbol: zend_error_noreturn using php as apache mod, it gives a blank output. Is there a way to intercept similar execeptions/failures from php/swig? Thanks in advance, Andrea |