[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:
Olly Betts 2011-02-18 06:39:51 +00:00
commit bf7c9e9a42
4 changed files with 28 additions and 1 deletions

View file

@ -140,6 +140,7 @@ CPP_TEST_CASES += \
conversion \
conversion_namespace \
conversion_ns_template \
covariant_return \
cplusplus_throw \
cpp_basic \
cpp_enum \

View 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);
};
%}