Add CHANGES.current entry and minimal doc update for previous change

This commit is contained in:
Olly Betts 2013-12-12 16:06:00 +13:00
commit bef3cfe594
2 changed files with 13 additions and 5 deletions

View file

@ -5,6 +5,13 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 3.0.0 (in progress) Version 3.0.0 (in progress)
============================ ============================
2013-12-12: vmiklos
[PHP] PHP's peculiar call-time pass-by-reference feature was
deprecated in PHP 5.3 and removed in PHP 5.4, so update the REF
typemaps in phppointers.i to specify pass-by-reference in the
function definition. Examples/php/pointer has been updated
accordingly.
2013-12-12: olly 2013-12-12: olly
[PHP] The usage of $input in PHP directorout typemaps has been [PHP] The usage of $input in PHP directorout typemaps has been
changed to be consistent with other languages. The typemaps changed to be consistent with other languages. The typemaps

View file

@ -503,13 +503,14 @@ echo "The sum $in1 + $in2 = $result\n";
Because PHP has a native concept of reference, it may seem more natural Because PHP has a native concept of reference, it may seem more natural
to the PHP developer to use references to pass pointers. To enable to the PHP developer to use references to pass pointers. To enable
this, one needs to include <b>phppointers.i</b> which defines the this, one needs to include <b>phppointers.i</b> which defines the
named typemap REFERENCE. named typemap REF.
</p> </p>
<p> <p>
However, this relies on call-time pass-by-reference, which has been Prior to SWIG 3.0, the REF typemaps relied on PHP's call-time
deprecated in PHP for some time, and was finally <b>removed in PHP 5.4</b>. pass-by-reference, which was deprecated in PHP 5.3 and removed in PHP 5.4.
So you should avoid creating new wrappers which rely on this approach. So if you use these REF typemaps, you should ensure that SWIG&ge;3.0 is
used to generate wrappers from your interface file.
</p> </p>
<div class="code"><pre> <div class="code"><pre>
@ -532,7 +533,7 @@ include("example.php");
$in1 = 3; $in1 = 3;
$in2 = 5; $in2 = 5;
$result = 0; $result = 0;
add(&amp;$in1,&amp;$in2,&amp;$result); add($in1,$in2,$result);
echo "The sum $in1 + $in2 = $result\n"; echo "The sum $in1 + $in2 = $result\n";
?&gt; ?&gt;