Merge branch 'master' into rtests2

This commit is contained in:
AndLLA 2022-11-16 20:57:03 +01:00
commit aab9c9843c
3 changed files with 10 additions and 29 deletions

View file

@ -7,6 +7,10 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
Version 4.2.0 (in progress) Version 4.2.0 (in progress)
=========================== ===========================
2022-11-13: olly
[PHP] #2419 Update the documentation to reflect that SWIG 4.1.0
dropped support for -noproxy when generating PHP wrappers.
2022-11-05: wsfulton 2022-11-05: wsfulton
#2417 Fix -swiglib for Windows when building with CMake. #2417 Fix -swiglib for Windows when building with CMake.

View file

@ -635,18 +635,12 @@ variable, or assigning <tt>NULL</tt> to a variable.
<p> <p>
SWIG defaults to wrapping C++ structs and classes with PHP classes. SWIG wraps C++ structs and classes with PHP classes.
Since SWIG 4.1.0, this is done entirely via PHP's C API - earlier SWIG Since SWIG 4.1.0, this is done entirely via PHP's C API - earlier SWIG
versions generated a PHP wrapper script which defined proxy classes versions generated a PHP wrapper script which defined proxy classes
which called a set of flat functions which actually wrapped the C++ class. which called a set of flat functions which actually wrapped the C++ class.
</p> </p>
<p>
If you don't want the class wrappers, you can pass the command-line option
"-noproxy" in which case you'll get C++ classes wrapped as flat functions
as described below.
</p>
<p> <p>
This interface file This interface file
</p> </p>
@ -699,33 +693,16 @@ Member variables and methods are accessed using the <tt>-&gt;</tt> operator.
<p> <p>
The <tt>-noproxy</tt> option flattens the object structure and SWIG/PHP used to support a <tt>-noproxy</tt> option to flatten the class
generates collections of named functions. The above example results structure and generate collections of named flat functions. This is no
in the following PHP functions: longer supported as of SWIG 4.1.0.
</p> </p>
<div class="code"><pre>
new_Vector();
Vector_x_set($obj, $d);
Vector_x_get($obj);
Vector_y_set($obj, $d);
Vector_y_get($obj);
Vector_z_set($obj, $d);
Vector_z_get($obj);
Vector_magnitude($obj);
new_Complex();
Complex_re_set($obj, $d);
Complex_re_get($obj);
Complex_im_set($obj, $d);
Complex_im_get($obj);
</pre></div>
<H4><a name="Php_nn2_6_2">32.2.6.2 Constructors and Destructors</a></H4> <H4><a name="Php_nn2_6_2">32.2.6.2 Constructors and Destructors</a></H4>
<p> <p>
The constructor is called when <tt>new Object()</tt> (or The constructor is called when <tt>new Object()</tt> is used to create an
<tt>new_Object()</tt> if using <tt>-noproxy</tt>) is used to create an
instance of the object. If multiple constructors are defined for an instance of the object. If multiple constructors are defined for an
object, function overloading will be used to determine which object, function overloading will be used to determine which
constructor to execute. constructor to execute.

View file

@ -254,7 +254,7 @@ details. The SWIG Wiki also has further details.
</p> </p>
<b>Compatibility Note:</b> Early versions of SWIG generated just a flattened low-level C style API to C++ classes by default. <b>Compatibility Note:</b> Early versions of SWIG generated just a flattened low-level C style API to C++ classes by default.
The <tt>-noproxy</tt> commandline option is recognised by many target languages and will generate just this The <tt>-noproxy</tt> commandline option is recognised by some target languages and will generate just this
interface as in earlier versions. interface as in earlier versions.
<H2><a name="SWIGPlus_nn38">6.5 Proxy classes</a></H2> <H2><a name="SWIGPlus_nn38">6.5 Proxy classes</a></H2>