Add PHP const ref typemaps for primitive types
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11549 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4297c7de33
commit
627d9faffd
4 changed files with 66 additions and 1 deletions
|
|
@ -33,10 +33,15 @@
|
|||
%enddef
|
||||
|
||||
%define %pass_by_val( TYPE, CONVERT_IN )
|
||||
%typemap(in) TYPE, const TYPE &
|
||||
%typemap(in) TYPE
|
||||
%{
|
||||
CONVERT_IN($1,$1_ltype,$input);
|
||||
%}
|
||||
%typemap(in) const TYPE &($*1_ltype temp)
|
||||
%{
|
||||
CONVERT_IN(temp,$*1_ltype,$input);
|
||||
$1 = &temp;
|
||||
%}
|
||||
%typemap(directorout) TYPE, const TYPE &
|
||||
%{
|
||||
CONVERT_IN($result,$1_ltype,$input);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue