Add missing typecheck typemaps for std::auto_ptr and std::unique_ptr
To fix overloading when using these types.
This commit is contained in:
parent
f0af17b324
commit
e97181ebc0
59 changed files with 442 additions and 2 deletions
|
|
@ -120,6 +120,18 @@ Cpp11_std_unique_ptr::takeKlassUniquePtr(nil)
|
|||
Cpp11_std_unique_ptr::takeKlassUniquePtr(Cpp11_std_unique_ptr::make_null())
|
||||
checkCount(0)
|
||||
|
||||
# overloaded parameters
|
||||
if (Cpp11_std_unique_ptr::overloadTest() != 0)
|
||||
raise RuntimeError, "overloadTest failed"
|
||||
end
|
||||
if (Cpp11_std_unique_ptr::overloadTest(nil) != 1)
|
||||
raise RuntimeError, "overloadTest failed"
|
||||
end
|
||||
if (Cpp11_std_unique_ptr::overloadTest(Cpp11_std_unique_ptr::Klass.new("over")) != 1)
|
||||
raise RuntimeError, "overloadTest failed"
|
||||
end
|
||||
checkCount(0);
|
||||
|
||||
|
||||
# unique_ptr as output
|
||||
k1 = Cpp11_std_unique_ptr::makeKlassUniquePtr("first")
|
||||
|
|
|
|||
|
|
@ -120,6 +120,18 @@ Li_std_auto_ptr::takeKlassAutoPtr(nil)
|
|||
Li_std_auto_ptr::takeKlassAutoPtr(Li_std_auto_ptr::make_null())
|
||||
checkCount(0)
|
||||
|
||||
# overloaded parameters
|
||||
if (Li_std_auto_ptr::overloadTest() != 0)
|
||||
raise RuntimeError, "overloadTest failed"
|
||||
end
|
||||
if (Li_std_auto_ptr::overloadTest(nil) != 1)
|
||||
raise RuntimeError, "overloadTest failed"
|
||||
end
|
||||
if (Li_std_auto_ptr::overloadTest(Li_std_auto_ptr::Klass.new("over")) != 1)
|
||||
raise RuntimeError, "overloadTest failed"
|
||||
end
|
||||
checkCount(0);
|
||||
|
||||
|
||||
# auto_ptr as output
|
||||
k1 = Li_std_auto_ptr::makeKlassAutoPtr("first")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue