[php] Generate PHP type declarations
We now automatically generate PHP type declarations for PHP >= 8.0. The generated code still compiles with PHP 7.x but without type declarations.
This commit is contained in:
parent
76d5a9ec27
commit
1f1349741f
12 changed files with 536 additions and 196 deletions
|
|
@ -63,12 +63,12 @@
|
|||
}
|
||||
%enddef
|
||||
|
||||
%define %pass_by_val( TYPE, CONVERT_IN )
|
||||
%typemap(in) TYPE
|
||||
%define %pass_by_val( TYPE, PHP_TYPE, CONVERT_IN )
|
||||
%typemap(in, phptype=PHP_TYPE) TYPE
|
||||
%{
|
||||
CONVERT_IN($1,$1_ltype,$input);
|
||||
%}
|
||||
%typemap(in) const TYPE & ($*1_ltype temp)
|
||||
%typemap(in, phptype=PHP_TYPE) const TYPE & ($*1_ltype temp)
|
||||
%{
|
||||
CONVERT_IN(temp,$*1_ltype,$input);
|
||||
$1 = &temp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue