Skip to content

Commit

Permalink
FFI section sync with EN (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen authored Feb 19, 2024
1 parent a782eb7 commit 3766c4e
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 28 deletions.
29 changes: 28 additions & 1 deletion reference/ffi/ffi.cdata.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 14767af0f05dffa6fdb9b49e1a1f4e9ca7022a60 Maintainer: pierrick Status: ready -->
<!-- EN-Revision: 10beb4156579b621246bca461be7a0017bc280ad Maintainer: pierrick Status: ready -->
<!-- Reviewed: no -->
<phpdoc:classref xml:id="class.ffi-cdata" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">

Expand Down Expand Up @@ -83,6 +83,11 @@
Toutes les données C peuvent être visualisées à l'aide de <function>var_dump</function>, <function>print_r</function>, etc.
</simpara>
</listitem>
<listitem>
<simpara>
<classname>FFI\CData</classname> peut maintenant être attribué à des structures et des champs à partir de PHP 8.3.0.
</simpara>
</listitem>
</itemizedlist>
<note>
<simpara>
Expand All @@ -109,6 +114,28 @@

</section>

<section role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.3.0</entry>
<entry>
<classname>FFI\CData</classname> peut maintenant être attribué à des structures et des champs.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>

</partintro>

<!-- &reference.ffi.entities.ffi-cdata; -->
Expand Down
35 changes: 26 additions & 9 deletions reference/ffi/ffi/cast.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 9e0804888ae46a50f28d98514a8d5e70a34e069c Maintainer: pierrick Status: ready -->
<!-- EN-Revision: 10beb4156579b621246bca461be7a0017bc280ad Maintainer: pierrick Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="ffi.cast" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand All @@ -10,11 +10,6 @@

<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="FFI">
<modifier>public</modifier> <modifier>static</modifier> <type class="union"><type>FFI\CData</type><type>null</type></type><methodname>FFI::cast</methodname>
<methodparam><type class="union"><type>FFI\CType</type><type>string</type></type><parameter>type</parameter></methodparam>
<methodparam><type class="union"><type>FFI\CData</type><type>int</type><type>float</type><type>bool</type><type>null</type></type><parameter role="reference">ptr</parameter></methodparam>
</methodsynopsis>
<methodsynopsis role="FFI">
<modifier>public</modifier> <type class="union"><type>FFI\CData</type><type>null</type></type><methodname>FFI::cast</methodname>
<methodparam><type class="union"><type>FFI\CType</type><type>string</type></type><parameter>type</parameter></methodparam>
Expand All @@ -26,9 +21,7 @@
L'objet résultant ne possède pas les données C et la source <parameter>ptr</parameter>
doit survivre au résultat. Le type C peut être spécifié en tant que <type>string</type> avec
n'importe quelle déclaration de type C valide ou en tant qu'objet <classname>FFI\CType</classname>, créé auparavant.
Si cette méthode est appelée de manière statique, elle ne doit utiliser que des noms de types C prédéfinis (par ex.
<literal>int</literal>, <literal>char</literal>, etc.); si la méthode est appelée en tant
que méthode d'instance, tout type déclaré pour l'instance est autorisé.
N'importe quel type déclaré pour l'instance est autorisé.
</para>
</refsect1>

Expand Down Expand Up @@ -62,6 +55,30 @@
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.3.0</entry>
<entry>
L'appel statique de <methodname>FFI::cast</methodname> est désormais obsolète.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
Expand Down
35 changes: 25 additions & 10 deletions reference/ffi/ffi/new.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 9e0804888ae46a50f28d98514a8d5e70a34e069c Maintainer: pierrick Status: ready -->
<!-- EN-Revision: 10beb4156579b621246bca461be7a0017bc280ad Maintainer: pierrick Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="ffi.new" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand All @@ -10,12 +10,6 @@

<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="FFI">
<modifier>public</modifier> <modifier>static</modifier> <type class="union"><type>FFI\CData</type><type>null</type></type><methodname>FFI::new</methodname>
<methodparam><type class="union"><type>FFI\CType</type><type>string</type></type><parameter>type</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>owned</parameter><initializer>&true;</initializer></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>persistent</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<methodsynopsis role="FFI">
<modifier>public</modifier> <type class="union"><type>FFI\CData</type><type>null</type></type><methodname>FFI::new</methodname>
<methodparam><type class="union"><type>FFI\CType</type><type>string</type></type><parameter>type</parameter></methodparam>
Expand All @@ -24,9 +18,7 @@
</methodsynopsis>
<para>
Crée une structure de données native du type C donné.
Si cette méthode est appelée de manière statique, elle ne doit utiliser que des noms de types C prédéfinis (par ex.
<literal>int</literal>, <literal>char</literal>, etc.) ; si la méthode est appelée en tant que méthode d'instance,
tout type déclaré pour l'instance est autorisé.
N'importe quel type déclaré pour l'instance est autorisé.
</para>
</refsect1>

Expand Down Expand Up @@ -74,6 +66,29 @@
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.3.0</entry>
<entry>
L'appel statique de <methodname>FFI::new</methodname> est désormais obsolète.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Expand Down
34 changes: 26 additions & 8 deletions reference/ffi/ffi/type.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: e281e1f40a1480dcc5a3d874185ce841bcae40d8 Maintainer: pierrick Status: ready -->
<!-- EN-Revision: 10beb4156579b621246bca461be7a0017bc280ad Maintainer: pierrick Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="ffi.type" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand All @@ -10,20 +10,14 @@

<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="FFI">
<modifier>public</modifier> <modifier>static</modifier> <type class="union"><type>FFI\CType</type><type>null</type></type><methodname>FFI::type</methodname>
<methodparam><type>string</type><parameter>type</parameter></methodparam>
</methodsynopsis>
<methodsynopsis role="FFI">
<modifier>public</modifier> <type class="union"><type>FFI\CType</type><type>null</type></type><methodname>FFI::type</methodname>
<methodparam><type>string</type><parameter>type</parameter></methodparam>
</methodsynopsis>
<para>
Cette fonction crée et retourne un objet <classname>FFI\CType</classname> pour la
<type>string</type> donnée contenant une déclaration de type C.
Si cette méthode est appelée de manière statique, elle ne doit utiliser que des noms de types C prédéfinis (par ex.
<literal>int</literal>, <literal>char</literal>, etc.) ; si la méthode est appelée en tant que
méthode d'instance, tout type déclaré pour l'instance est autorisé.
N'importe quel type déclaré pour l'instance est autorisé.
</para>
</refsect1>

Expand All @@ -49,6 +43,30 @@
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.3.0</entry>
<entry>
L'appel statique de <methodname>FFI::type</methodname> est désormais obsolète.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
Expand Down

0 comments on commit 3766c4e

Please sign in to comment.