add better director+exception support
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7038 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9350534385
commit
ca7159f7e7
9 changed files with 203 additions and 108 deletions
|
|
@ -71,12 +71,12 @@
|
|||
%typemap(directorargout,fragment=pyfrag) Type *DIRECTOROUT {
|
||||
if ($input) *$result = SWIG_static_cast(SWIG_arg(as_meth($input)),$type);
|
||||
if (!$input || PyErr_Occurred())
|
||||
throw Swig::DirectorTypeMismatchException("Error converting Python object using as_meth");
|
||||
Swig::DirectorTypeMismatchException::raise("Error converting Python object when using as_meth.");
|
||||
}
|
||||
%typemap(directorout,fragment=pyfrag) Type {
|
||||
if ($input) $result = SWIG_static_cast(SWIG_arg(as_meth($input)),$type);
|
||||
if (!$input || PyErr_Occurred())
|
||||
throw Swig::DirectorTypeMismatchException("Error converting Python object using as_meth");
|
||||
Swig::DirectorTypeMismatchException::raise("Error converting Python object when using as_meth.");
|
||||
}
|
||||
%typemap(directorout,fragment=pyfrag,warning="470:Using thread/reentrant unsafe wrapping, consider using a plain '"#Type"' return type instead.") const Type& {
|
||||
if ($input) {
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
$result = &temp;
|
||||
}
|
||||
if (!$input || PyErr_Occurred())
|
||||
throw Swig::DirectorTypeMismatchException("Error converting Python object using as_meth");
|
||||
Swig::DirectorTypeMismatchException::raise("Error converting Python object when using as_meth.");
|
||||
}
|
||||
%typemap(directorout,fragment=pyfrag) Type &DIRECTOROUT = Type
|
||||
%enddef
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue