Fix std::vector of const pointers

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11704 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2009-10-20 18:22:16 +00:00
commit 132376bade
5 changed files with 67 additions and 2 deletions

View file

@ -154,3 +154,23 @@ if extractInt(vi[0]) != 11:
if extractInt(vi[1]) != 22:
raise RuntimeError
# vector const pointer checks
csp = makeConstShortPtr(111)
error = 0
try:
vcs = ConstShortPtrVector((csp, dp)) # check vector<const unsigned short *> does not accept double * element
error = 1
except:
pass
if error:
raise RuntimeError
vcs = ConstShortPtrVector((csp, makeConstShortPtr(222)))
if extractConstShort(vcs[0]) != 111:
raise RuntimeError
if extractConstShort(vcs[1]) != 222:
raise RuntimeError