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:
parent
8cc9533152
commit
2568b57d46
11 changed files with 248 additions and 111 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue