more fixes for exceptions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5944 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
354b4f2ccb
commit
3f8ed3e650
1 changed files with 20 additions and 4 deletions
|
|
@ -226,9 +226,8 @@
|
||||||
SWIG_fail;
|
SWIG_fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This doesn't work, and not sure if it is needed... */
|
|
||||||
#if 0
|
%typemap(throws) SWIGTYPE * {
|
||||||
%typecheck(throws) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [] {
|
|
||||||
if ($1_descriptor->clientdata) {
|
if ($1_descriptor->clientdata) {
|
||||||
PyErr_SetObject((PyObject *) ($1_descriptor->clientdata), SWIG_NewPointerObj($1,$1_descriptor,1));
|
PyErr_SetObject((PyObject *) ($1_descriptor->clientdata), SWIG_NewPointerObj($1,$1_descriptor,1));
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -236,5 +235,22 @@
|
||||||
}
|
}
|
||||||
SWIG_fail;
|
SWIG_fail;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
%typemap(throws) SWIGTYPE [ANY] {
|
||||||
|
if ($1_descriptor->clientdata) {
|
||||||
|
PyErr_SetObject((PyObject *) ($1_descriptor->clientdata), SWIG_NewPointerObj($1,$1_descriptor,1));
|
||||||
|
} else {
|
||||||
|
PyErr_SetString(PyExc_RuntimeError,"$1_type");
|
||||||
|
}
|
||||||
|
SWIG_fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
%typemap(throws) SWIGTYPE & {
|
||||||
|
if ($1_descriptor->clientdata) {
|
||||||
|
PyErr_SetObject((PyObject *) ($1_descriptor->clientdata), SWIG_NewPointerObj(&($1),$1_descriptor,1));
|
||||||
|
} else {
|
||||||
|
PyErr_SetString(PyExc_RuntimeError,"$1_type");
|
||||||
|
}
|
||||||
|
SWIG_fail;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue