PHP: Add directorout typemap for primitive type const refs

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11559 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Miklos Vajna 2009-08-14 04:22:03 +00:00
commit 6f80e2f7a6

View file

@ -42,10 +42,15 @@
CONVERT_IN(temp,$*1_ltype,$input); CONVERT_IN(temp,$*1_ltype,$input);
$1 = &temp; $1 = &temp;
%} %}
%typemap(directorout) TYPE, const TYPE & %typemap(directorout) TYPE
%{ %{
CONVERT_IN($result,$1_ltype,$input); CONVERT_IN($result,$1_ltype,$input);
%} %}
%typemap(directorout) const TYPE & ($*1_ltype temp)
%{
CONVERT_IN(temp,$*1_ltype,$input);
$result = &temp;
%}
%enddef %enddef
%fragment("t_output_helper","header") %{ %fragment("t_output_helper","header") %{