|
2 | 2 | <!-- $Revision$ --> |
3 | 3 | <!-- EN-Revision: 10beb4156579b621246bca461be7a0017bc280ad Maintainer: nsfisis Status: working --> |
4 | 4 |
|
5 | | -!!! |
6 | 5 | <refentry xml:id="ffi.new" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> |
7 | 6 | <refnamediv> |
8 | 7 | <refname>FFI::new</refname> |
|
18 | 17 | <methodparam choice="opt"><type>bool</type><parameter>persistent</parameter><initializer>&false;</initializer></methodparam> |
19 | 18 | </methodsynopsis> |
20 | 19 | <para> |
21 | | - Creates a native data structure of the given C type. |
| 20 | + 与えられた C の型を持つネイティブデータ構造を作成します。 |
22 | 21 | このインスタンスで宣言された任意の型が使えます。 |
23 | 22 | </para> |
24 | 23 | </refsect1> |
|
30 | 29 | <term><parameter>type</parameter></term> |
31 | 30 | <listitem> |
32 | 31 | <para> |
33 | | - <parameter>type</parameter> is a valid C declaration as <type>string</type>, or an |
34 | | - instance of <classname>FFI\CType</classname> which has already been created. |
| 32 | + <parameter>type</parameter> は、有効な C の宣言を表す <type>string</type> か、 |
| 33 | + 作成済みの <classname>FFI\CType</classname> のインスタンスです。 |
35 | 34 | </para> |
36 | 35 | </listitem> |
37 | 36 | </varlistentry> |
38 | 37 | <varlistentry> |
39 | 38 | <term><parameter>owned</parameter></term> |
40 | 39 | <listitem> |
41 | 40 | <para> |
42 | | - Whether to create owned (i.e. managed) or unmanaged data. Managed data lives together |
43 | | - with the returned <classname>FFI\CData</classname> object, and is released when the |
44 | | - last reference to that object is released by regular PHP reference counting or GC. |
45 | | - Unmanaged data should be released by calling <methodname>FFI::free</methodname>, |
46 | | - when no longer needed. |
| 41 | + 所有された (マネージドな) データを作成するか、アンマネージドなデータを作成するか。 |
| 42 | + マネージドデータは返される <classname>FFI\CData</classname> オブジェクトと共に生存し、 |
| 43 | + そのオブジェクトへの最後の参照が PHP の通常のリファレンスカウントや GC によって解放されたときに解放されます。 |
| 44 | + アンマネージドなデータは、不要になったら <methodname>FFI::free</methodname> を呼んで解放すべきです。 |
47 | 45 | </para> |
48 | 46 | </listitem> |
49 | 47 | </varlistentry> |
50 | 48 | <varlistentry> |
51 | 49 | <term><parameter>persistent</parameter></term> |
52 | 50 | <listitem> |
53 | 51 | <para> |
54 | | - Whether to allocate the C data structure permanently on the system heap (using |
55 | | - <function>malloc</function>), or on the PHP request heap (using <function>emalloc</function>). |
| 52 | + この C のデータ構造をシステムヒープ上に永続的に確保するか (<function>malloc</function> を使用)、 |
| 53 | + PHP のリクエストヒープ上に確保するか (<function>emalloc</function> を使用)。 |
56 | 54 | </para> |
57 | 55 | </listitem> |
58 | 56 | </varlistentry> |
|
0 commit comments