r1603: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 21 Mar 2002 08:30:10 +0000 (08:30 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 21 Mar 2002 08:30:10 +0000 (08:30 +0000)
doc/ref.sgml
examples/union.cl
tests/union.cl

index 82ee66a5df717e7d9ed15cbbfa5e3d8d607c39f1..714d8e99ca665e0f9a6500129b380dad5412ae0d 100644 (file)
@@ -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>
index 197332f168e0a04b843640241aa96daefd57f47c..b876699b6f1fd7ae5fc312e47a16c049f9351c25 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Mar 2002
 ;;;;
-;;;; $Id: union.cl,v 1.1 2002/03/21 07:56:45 kevin Exp $
+;;;; $Id: union.cl,v 1.2 2002/03/21 08:30:10 kevin Exp $
 ;;;;
 ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -27,7 +27,7 @@
 
 (defun test-union-1 ()
   (let ((u (uffi:allocate-foreign-object tunion1)))
-    (setf (uffi:get-slot-value u 'tunion1 'int) 
+    (setf (uffi:get-slot-value u 'tunion1 'uint) 
       (+ (char-code #\A) 
         (* 256 (char-code #\B))
         (* 65536 (char-code #\C))
index 197332f168e0a04b843640241aa96daefd57f47c..b876699b6f1fd7ae5fc312e47a16c049f9351c25 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Mar 2002
 ;;;;
-;;;; $Id: union.cl,v 1.1 2002/03/21 07:56:45 kevin Exp $
+;;;; $Id: union.cl,v 1.2 2002/03/21 08:30:10 kevin Exp $
 ;;;;
 ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -27,7 +27,7 @@
 
 (defun test-union-1 ()
   (let ((u (uffi:allocate-foreign-object tunion1)))
-    (setf (uffi:get-slot-value u 'tunion1 'int) 
+    (setf (uffi:get-slot-value u 'tunion1 'uint) 
       (+ (char-code #\A) 
         (* 256 (char-code #\B))
         (* 65536 (char-code #\C))