<refsect1>
<title>Examples</title>
<programlisting>
-(def-array ca :char)
+(def-array-pointer ca :unsigned-char)
(let ((fs (convert-to-foreign-string "ab")))
(values (null-char-p (deref-array fs 'ca 0))
(null-char-p (deref-array fs 'ca 2))))
</refentry>
- <refentry id="def-array">
+ <refentry id="def-array-pointer">
<refnamediv>
- <refname>def-array</refname>
- <refpurpose>Defines a foreign array type.
+ <refname>def-array-pointer</refname>
+ <refpurpose>Defines a pointer to a array of type.
</refpurpose>
<refclass>Macro</refclass>
</refnamediv>
<refsynopsisdiv>
<title>Syntax</title>
<synopsis>
- <function>def-array</function> <replaceable>name type</replaceable>
+ <function>def-array-pointer</function> <replaceable>name type</replaceable>
</synopsis>
</refsynopsisdiv>
<refsect1>
<refsect1>
<title>Description</title>
<para>
- Defines a foreign array type.
+ Defines a type tat is a pointer to an array of type.
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<programlisting>
-(def-array byte-array :unsigned-char)
+(def-array-pointer byte-array-pointer :unsigned-char)
</programlisting>
</refsect1>
<refsect1>
<refsynopsisdiv>
<title>Syntax</title>
<synopsis>
- <function>allocate-foreign-object</function> <replaceable>type</replaceable> => <returnvalue>ptr</returnvalue>
+ <function>allocate-foreign-object</function> <replaceable>type &optional size</replaceable> => <returnvalue>ptr</returnvalue>
</synopsis>
</refsynopsisdiv>
<refsect1>
<varlistentry>
<term><parameter>type</parameter></term>
<listitem>
- <para>A type of foreign object to allocate.
+ <para>A unevaluated type of foreign object to allocate.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>size</parameter></term>
+ <listitem>
+ <para>An optional size parameter. If specified, allocates and returns an
+array of <parameter>type</parameter> that is <parameter>size</parameter> members long.
</para>
</listitem>
</varlistentry>
<refentry id="ensure-char-character">
<refnamediv>
<refname>ensure-char-character</refname>
- <refpurpose>Ensures that a dereferenced :char pointer is
+ <refpurpose>Ensures that a dereferenced <constant>:char</constant> pointer is
a character.
</refpurpose>
<refclass>Macro</refclass>
<refentry id="ensure-char-integer">
<refnamediv>
<refname>ensure-char-integer</refname>
- <refpurpose>Ensures that a dereferenced :char pointer is
+ <refpurpose>Ensures that a dereferenced <constant>:char</constant> pointer is
an integer.
</refpurpose>
<refclass>Macro</refclass>