Show as 'unknown type' instead of seg faulting in the unusual event that type information is not set.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12915 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
65942bd224
commit
3340045d67
1 changed files with 1 additions and 1 deletions
|
|
@ -429,7 +429,7 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
|
|||
#endif
|
||||
{
|
||||
const char *name = SWIG_TypePrettyName(v->ty);
|
||||
PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, (void *)v);
|
||||
PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
|
||||
if (v->next) {
|
||||
# ifdef METH_NOARGS
|
||||
PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue