Clarify $lib default behavior of FFI::cdef()

Firstly, $lib does not default to NULL; actually, it has no default.
Secondly, we document what happens if $lib is omitted.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@347387 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2019-05-06 10:48:14 +00:00
parent 4a86f6e16d
commit 09b078144a

View file

@ -12,7 +12,7 @@
<methodsynopsis>
<modifier>public</modifier> <modifier>static</modifier> <type>FFI</type><methodname>FFI::cdef</methodname>
<methodparam choice="opt"><type>string</type><parameter>code</parameter><initializer>""</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>lib</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>lib</parameter></methodparam>
</methodsynopsis>
<para>
Creates a new FFI object.
@ -45,6 +45,13 @@
The name of a shared library file, to be loaded and linked with the
definitions.
</para>
<note>
<para>
If <parameter>lib</parameter> is omitted, platforms supporting <literal>RTLD_DEFAULT</literal>
attempt to lookup symbols declared in <parameter>code</parameter> in the normal global
scope. Other systems will fail to resolve these symbols.
</para>
</note>
</listitem>
</varlistentry>
</variablelist>