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
|
|
@ -65,7 +65,7 @@
|
|||
Type *ptr = 0;
|
||||
int res = $input ? asptr_meth($input, &ptr) : 0;
|
||||
if (!res || !ptr)
|
||||
throw Swig::DirectorTypeMismatchException("Error converting Python object using asptr_meth");
|
||||
Swig::DirectorTypeMismatchException::raise("Error converting Python object when using asptr_meth.");
|
||||
temp = *ptr;
|
||||
$result = &temp;
|
||||
if (res == SWIG_NEWOBJ) delete ptr;
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
Type *ptr = 0;
|
||||
int res = $input ? asptr_meth($input, &ptr) : 0;
|
||||
if (!res || !ptr)
|
||||
throw Swig::DirectorTypeMismatchException("Error converting Python object using asptr_meth");
|
||||
Swig::DirectorTypeMismatchException::raise("Error converting Python object when using asptr_meth.");
|
||||
$result = *ptr;
|
||||
if (res == SWIG_NEWOBJ) delete ptr;
|
||||
}
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
Type *ptr = 0;
|
||||
int res = $input ? asptr_meth($input, &ptr) : 0;
|
||||
if (!res || !ptr)
|
||||
throw Swig::DirectorTypeMismatchException("Error converting Python object using asptr_meth");
|
||||
Swig::DirectorTypeMismatchException::raise("Error converting Python object when using asptr_meth.");
|
||||
$result = ptr;
|
||||
if (res == SWIG_NEWOBJ) {
|
||||
/* Possible thread/reentrant problem here! */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue