|
16 | 16 | </methodsynopsis> |
17 | 17 | <para> |
18 | 18 | C のヘッダーファイルから C の宣言を読み込みます。 |
19 | | - !!! |
20 | | - Loads C declarations from a C header file. It is possible to specify shared libraries that should be loaded, |
21 | | - using special <literal>FFI_LIB</literal> defines in the loaded C header file. |
| 19 | + 読み込まれる C のヘッダーファイル内で特殊な define <literal>FFI_LIB</literal> を使うことで、 |
| 20 | + 読み込む共有ライブラリを指定することが可能です。 |
22 | 21 | </para> |
23 | 22 | </refsect1> |
24 | 23 |
|
|
34 | 33 | <para> |
35 | 34 | C のプリプロセッサーディレクティブはサポートされていません。 |
36 | 35 | 例えば、<code>#include</code> や <code>#define</code>、プリプロセッサーマクロは動作しません。 |
37 | | - ただし、次に列挙する特殊な場合を除きます。 |
| 36 | + ただし、次に挙げる特殊な場合を除きます。 |
38 | 37 | </para> |
39 | 38 | <para> |
40 | | - !!! |
41 | | - The header file <emphasis>should</emphasis> contain a <literal>#define</literal> statement for the |
42 | | - <literal>FFI_SCOPE</literal> variable, e.g.: <code>#define FFI_SCOPE "MYLIB"</code>. |
43 | | - 詳しくは <link linkend="ffi.intro">class introduction</link> を参照してください。 |
| 39 | + このヘッダーファイルでは、<literal>#define</literal> 文で |
| 40 | + <literal>FFI_SCOPE</literal> 変数を定義<emphasis>すべき</emphasis>です |
| 41 | + (例: <code>#define FFI_SCOPE "MYLIB"</code>)。 |
| 42 | + 詳しくは <link linkend="ffi.intro">FFI クラスの概要</link> を参照してください。 |
44 | 43 | </para> |
45 | 44 | <para> |
46 | | - !!! |
47 | | - The header file <emphasis>may</emphasis> contain a <literal>#define</literal> statement for the |
48 | | - <literal>FFI_LIB</literal> variable to specify the library it exposes. If it is |
49 | | - a system library only the file name is required, e.g.: <code>#define FFI_LIB |
50 | | - "libc.so.6"</code>. If it is a custom library, a relative path is required, |
51 | | - e.g.: <code>#define FFI_LIB "./mylib.so"</code>. |
| 45 | + このヘッダーファイルでは、<literal>#define</literal> 文で |
| 46 | + <literal>FFI_LIB</literal> 変数を定義することで、公開するライブラリを指定<emphasis>しても構いません</emphasis>。 |
| 47 | + それがシステムライブラリなら、必要なのはファイル名だけです (例: <code>#define FFI_LIB |
| 48 | + "libc.so.6"</code>)。カスタムライブラリなら、相対パスが必要です |
| 49 | + (例: <code>#define FFI_LIB "./mylib.so"</code>)。 |
52 | 50 | </para> |
53 | 51 | </listitem> |
54 | 52 | </varlistentry> |
|
77 | 75 | <row> |
78 | 76 | <entry>8.3.0</entry> |
79 | 77 | <entry> |
80 | | - !!! |
81 | | - <methodname>FFI::load</methodname> is now allowed in |
82 | | - <link linkend="opcache.preloading">preload scripts</link> when the |
83 | | - current system user is the same as the one defined in the |
84 | | - <literal>opcache.preload_user</literal> configuration directive. |
| 78 | + 現在のシステムユーザが <literal>opcache.preload_user</literal> |
| 79 | + 設定ディレクティブで定義されたユーザと同じである場合、 |
| 80 | + <link linkend="opcache.preloading">事前ロードスクリプト</link> の中で |
| 81 | + <methodname>FFI::load</methodname> を呼べるようになりました。 |
85 | 82 | </entry> |
86 | 83 | </row> |
87 | 84 | </tbody> |
|
0 commit comments