Restore containers accepting NULL pointers when used in overloaded methods - problem reported by Josh Cherry
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10217 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5ad2a3ab0c
commit
76229dbab8
3 changed files with 12 additions and 1 deletions
|
|
@ -135,5 +135,7 @@ std::string overloaded1(std::vector<double> vi) { return "vector<double>"; }
|
|||
std::string overloaded1(std::vector<int> vi) { return "vector<int>"; }
|
||||
std::string overloaded2(std::vector<int> vi) { return "vector<int>"; }
|
||||
std::string overloaded2(std::vector<double> vi) { return "vector<double>"; }
|
||||
std::string overloaded3(std::vector<int> *vi) { return "vector<int> *"; }
|
||||
std::string overloaded3(int i) { return "int"; }
|
||||
%}
|
||||
|
||||
|
|
|
|||
|
|
@ -124,3 +124,12 @@ if overloaded2(iv) != "vector<int>":
|
|||
if overloaded2(dv) != "vector<double>":
|
||||
raise RuntimeError
|
||||
|
||||
if overloaded3(iv) != "vector<int> *":
|
||||
raise RuntimeError
|
||||
|
||||
if overloaded3(None) != "vector<int> *":
|
||||
raise RuntimeError
|
||||
|
||||
if overloaded3(100) != "int":
|
||||
raise RuntimeError
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue