extending std_string and more fixes

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5771 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-03-18 21:20:55 +00:00
commit 2568b57d46
11 changed files with 248 additions and 111 deletions

View file

@ -37,7 +37,13 @@ namespace swigpy
operator T () const
{
swigpy::PyObject_var item = PySequence_GetItem(_seq, _index);
return swigpy::as<T>(item);
try {
return swigpy::as<T>(item, true);
} catch (std::exception& e) {
PyErr_Format(PyExc_TypeError,
"error in sequence element %d: %s", _index, e.what());
throw;
}
}
PySequence_Ref& operator=(const T& v)