r1636: Updated/cleaned def-array to def-array-pointer
[uffi.git] / doc / ref.sgml
index 82ee66a5df717e7d9ed15cbbfa5e3d8d607c39f1..fcb08ebf8af2ca1e2e2e45629fcfe73eee1a7eef 100644 (file)
@@ -315,7 +315,7 @@ abstracts the difference in implementations where some return a
       <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))))
@@ -640,17 +640,17 @@ structure. It's type is <constant>:pointer-self</constant>.
     </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>
@@ -675,13 +675,13 @@ structure. It's type is <constant>:pointer-self</constant>.
       <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>
@@ -868,7 +868,7 @@ can be freed.
       <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>
-         <function>allocate-foreign-object</function> <replaceable>type</replaceable> => <returnvalue>ptr</returnvalue>
+         <function>allocate-foreign-object</function> <replaceable>type &amp;optional size</replaceable> => <returnvalue>ptr</returnvalue>
        </synopsis>
       </refsynopsisdiv>
       <refsect1>
@@ -877,7 +877,15 @@ can be freed.
          <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>
@@ -1093,7 +1101,7 @@ can be freed.
     <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>
@@ -1161,7 +1169,7 @@ integer.</para>
     <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>