fix overloading between unsigned long long and strings, as reported by Tim Lee.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9036 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f854385d57
commit
54eb801392
4 changed files with 75 additions and 5 deletions
|
|
@ -107,3 +107,23 @@ struct Structure {
|
|||
const std::string Structure::ConstStaticMemberString = "const static member string";
|
||||
%}
|
||||
|
||||
|
||||
%inline %{
|
||||
class Foo {
|
||||
public:
|
||||
unsigned long long test(unsigned long long l)
|
||||
{
|
||||
return l + 1;
|
||||
}
|
||||
std::string test(std::string l)
|
||||
{
|
||||
return l + "1";
|
||||
}
|
||||
|
||||
unsigned long long testl(unsigned long long l)
|
||||
{
|
||||
return l + 1;
|
||||
}
|
||||
|
||||
};
|
||||
%}
|
||||
|
|
|
|||
|
|
@ -105,3 +105,16 @@ if (li_std_string::test_reference_input("hello") ne "hello") {
|
|||
if (li_std_string::test_reference_inout("hello") ne "hellohello") {
|
||||
die ("reference_inout");
|
||||
}
|
||||
|
||||
|
||||
$gen1 = new li_std_string::Foo();
|
||||
if ($gen1->test(1) ne 2) {
|
||||
die ("ulonglong");
|
||||
}
|
||||
if ($gen1->test("1") ne "11") {
|
||||
die ("ulonglong");
|
||||
}
|
||||
if ($gen1->testl(9234567890121111113) ne 9234567890121111114) {
|
||||
die ("ulonglong");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue