Make PHP directors work more like other languages
A PHP exception now gets translated to a C++ exception to skips over C++ code to get back to PHP, avoiding the need to gate every directorout typemap on EG(exception).
This commit is contained in:
parent
10d87100ea
commit
50426aae20
8 changed files with 50 additions and 88 deletions
|
|
@ -75,19 +75,15 @@
|
|||
%}
|
||||
%typemap(directorout) TYPE
|
||||
%{
|
||||
if (!EG(exception)) {
|
||||
CONVERT_IN($result, $1_ltype, *$input);
|
||||
}
|
||||
CONVERT_IN($result, $1_ltype, *$input);
|
||||
%}
|
||||
%typemap(directorout) const TYPE &
|
||||
%{
|
||||
$*1_ltype swig_val;
|
||||
if (!EG(exception)) {
|
||||
CONVERT_IN(swig_val, $*1_ltype, *$input);
|
||||
$1_ltype temp = new $*1_ltype(($*1_ltype)swig_val);
|
||||
swig_acquire_ownership(temp);
|
||||
$result = temp;
|
||||
}
|
||||
CONVERT_IN(swig_val, $*1_ltype, *$input);
|
||||
$1_ltype temp = new $*1_ltype(($*1_ltype)swig_val);
|
||||
swig_acquire_ownership(temp);
|
||||
$result = temp;
|
||||
%}
|
||||
%typemap(directorfree) const TYPE &
|
||||
%{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue