fix std::vector<const int*>, reported by tagna@gaia.ecs.csus.edu

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9084 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-05-04 05:24:41 +00:00
commit 553c551fef
2 changed files with 11 additions and 0 deletions

View file

@ -22,6 +22,13 @@ namespace swig {
}
};
template <class Type> struct traits_from<const Type *> {
static PyObject *from(const Type* val) {
return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0);
}
};
template <class Type>
inline PyObject *from(const Type& val) {
return traits_from<Type>::from(val);