Skip to content

Commit 0b82b81

Browse files
committed
wip
1 parent fe3b7ee commit 0b82b81

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

reference/ffi/ffi/new.xml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<!-- $Revision$ -->
33
<!-- EN-Revision: 10beb4156579b621246bca461be7a0017bc280ad Maintainer: nsfisis Status: working -->
44

5-
!!!
65
<refentry xml:id="ffi.new" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
76
<refnamediv>
87
<refname>FFI::new</refname>
@@ -18,7 +17,7 @@
1817
<methodparam choice="opt"><type>bool</type><parameter>persistent</parameter><initializer>&false;</initializer></methodparam>
1918
</methodsynopsis>
2019
<para>
21-
Creates a native data structure of the given C type.
20+
与えられた C の型を持つネイティブデータ構造を作成します。
2221
このインスタンスで宣言された任意の型が使えます。
2322
</para>
2423
</refsect1>
@@ -30,29 +29,28 @@
3029
<term><parameter>type</parameter></term>
3130
<listitem>
3231
<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> のインスタンスです。
3534
</para>
3635
</listitem>
3736
</varlistentry>
3837
<varlistentry>
3938
<term><parameter>owned</parameter></term>
4039
<listitem>
4140
<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> を呼んで解放すべきです。
4745
</para>
4846
</listitem>
4947
</varlistentry>
5048
<varlistentry>
5149
<term><parameter>persistent</parameter></term>
5250
<listitem>
5351
<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> を使用)。
5654
</para>
5755
</listitem>
5856
</varlistentry>

0 commit comments

Comments
 (0)