Add missing typecheck typemaps for std::auto_ptr and std::unique_ptr

To fix overloading when using these types.
This commit is contained in:
William S Fulton 2022-09-17 10:23:51 +01:00
commit e97181ebc0
59 changed files with 442 additions and 2 deletions

View file

@ -81,6 +81,15 @@ takeKlassUniquePtr(None)
takeKlassUniquePtr(make_null())
checkCount(0)
# overloaded parameters
if overloadTest() != 0:
raise RuntimeError("overloadTest failed")
if overloadTest(None) != 1:
raise RuntimeError("overloadTest failed")
if overloadTest(Klass("over")) != 1:
raise RuntimeError("overloadTest failed")
checkCount(0);
# unique_ptr as output
k1 = makeKlassUniquePtr("first")

View file

@ -81,6 +81,15 @@ takeKlassAutoPtr(None)
takeKlassAutoPtr(make_null())
checkCount(0)
# overloaded parameters
if overloadTest() != 0:
raise RuntimeError("overloadTest failed")
if overloadTest(None) != 1:
raise RuntimeError("overloadTest failed")
if overloadTest(Klass("over")) != 1:
raise RuntimeError("overloadTest failed")
checkCount(0);
# auto_ptr as output
k1 = makeKlassAutoPtr("first")