Fix directorout typemaps which were causing undefined behaviour when returning pointers by reference.
Closes #1167
This commit is contained in:
parent
224bb9e023
commit
e86c881a70
6 changed files with 24 additions and 7 deletions
|
|
@ -380,6 +380,11 @@
|
|||
%typemap(directorout) SWIGTYPE &
|
||||
%{ *($&1_ltype)&$result = $input; %}
|
||||
|
||||
%typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) SWIGTYPE *const&
|
||||
%{ static $*1_ltype swig_temp;
|
||||
swig_temp = *($1_ltype)&$input;
|
||||
$result = &swig_temp; %}
|
||||
|
||||
%typemap(gotype) SWIGTYPE &&
|
||||
%{$gotypename%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue