Merged with recent changes from trunk.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@11187 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
da5ade3143
commit
8c74fa0f46
703 changed files with 21126 additions and 9266 deletions
|
|
@ -55,15 +55,16 @@ SWIG_Python_AddErrorMsg(const char* mesg)
|
|||
|
||||
if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
|
||||
if (value) {
|
||||
char *tmp;
|
||||
PyObject *old_str = PyObject_Str(value);
|
||||
PyErr_Clear();
|
||||
Py_XINCREF(type);
|
||||
PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
|
||||
|
||||
PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
|
||||
SWIG_Python_str_DelForPy3(tmp);
|
||||
Py_DECREF(old_str);
|
||||
Py_DECREF(value);
|
||||
} else {
|
||||
PyErr_SetString(PyExc_RuntimeError, mesg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue