[PHP] An overloaded method which can return an object or a
primitive type no longer causes SWIG to segfault. Reported by Paul Colby in SF#3168531. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12471 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3cee7b7b3e
commit
bf7c9e9a42
4 changed files with 28 additions and 1 deletions
|
|
@ -140,6 +140,7 @@ CPP_TEST_CASES += \
|
|||
conversion \
|
||||
conversion_namespace \
|
||||
conversion_ns_template \
|
||||
covariant_return \
|
||||
cplusplus_throw \
|
||||
cpp_basic \
|
||||
cpp_enum \
|
||||
|
|
|
|||
16
Examples/test-suite/covariant_return.i
Normal file
16
Examples/test-suite/covariant_return.i
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
%module covariant_return
|
||||
|
||||
// Regression test for PHP from SF#3168531i (SWIG <= 2.0.1 segfaults).
|
||||
|
||||
%inline %{
|
||||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
class A { };
|
||||
class B {
|
||||
public:
|
||||
int foo(int x);
|
||||
A foo(string y);
|
||||
};
|
||||
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue