r1555: *** empty log message ***
[uffi.git] / doc / ref.sgml
index 39fa543ee0667c159d4f332f9094cf3afaadb0da..aaf1feac499abe4fde3a6c841017de27e7a7328e 100644 (file)
        </para>
       </sect2>
 
-      <sect2 id="uffi-declare">
-       <title>uffi-declare</title>
-       <para>
-         This is used wherever a <function>declare</function>
-         expression can be placed. For example:
-       </para>
-       <para>
-         <programlisting>
-(let ((my-structure (uffi:allocate-foreign-object 'a-struct)))
-   (uffi:uffi-declare a-struct my-structure))
-         </programlisting>
-       </para>
-      </sect2>
-
-      <sect2 id="slot-type">
-       <title>slot-type</title>
+      <sect2 id="def-type">
+       <title>def-type</title>
        <para>
-         This is used inside of <function>defclass</function> and
-         <function>defstruct</function> expressions to set the type
-         for a field. Because the type identifier is not evaluated in
-         &cl;, the expression must be backquoted for effect. For
-         example:
-       </para>
+         This is used wherever a &cl; <function>deftype</function>
+         expression can be placed. Used to declare types to
+the compiler for optimization. Currently, on &cmucl; takes advantage
+of this.       </para>
        <para>
          <programlisting>
-(eval 
-  `(defclass a-class ()
-     ((char-ptr :type ,(uffi:slot-type (* :char))))))
+(uffi:def-type my-struct-def my-struct-foreign-type)
          </programlisting>
        </para>
       </sect2>
     </sect1>
 
     <sect1>
-      <title>Immediate Types</title>
+      <title>Primitive Types</title>
       <sect2>
        <title>Overview</title>
        <para>
-         Immediate types have a single value, these include
+         Primitive types have a single value, these include
          characters, numbers, and pointers. They are all symbols in
          the keyword package.
        </para>
@@ -339,12 +321,12 @@ always need to have memory for them.
        </refpurpose>
        <refclass>Macro</refclass>
       </refnamediv>
-      <refsect1>
+      <refsynopsisdiv>
        <title>Syntax</title>
-<synopsis>
+       <synopsis>
          <function>def-function</function> <replaceable>name args &amp;key module returning</replaceable>
-</synopsis>
-      </refsect1>
+       </synopsis>
+      </refsynopsisdiv>
       <refsect1>
        <title>Arguments and Values</title>
        <variablelist>
@@ -419,7 +401,7 @@ foreign function.
       <refsect1>
        <title>Syntax</title>
 <synopsis>
-         <function>load-foreign-library</function> <replaceable>filename module supporting-libraries</replaceable> => <returnvalue>success</returnvalue>
+         <function>load-foreign-library</function> <replaceable>filename &amp;key module supporting-libraries</replaceable> => <returnvalue>success</returnvalue>
 </synopsis>
       </refsect1>
       <refsect1>
@@ -429,7 +411,8 @@ foreign function.
            <term><parameter>filename</parameter></term>
            <listitem>
              <para>A string or pathname specifying the library location
-in the filesystem.
+in the filesystem. At least one implementation (&lw;) can not
+accept a logical pathname.
              </para>
            </listitem>
          </varlistentry>
@@ -470,7 +453,9 @@ a session.
       <refsect1>
        <title>Examples</title>
        <programlisting>
-  (load-foreign-library #p"/usr/lib/libmysqlclient.so" "mysql" '("c"))
+  (load-foreign-library #p"/usr/lib/libmysqlclient.so" 
+                        :module "mysql" 
+                        :supporting-libraries '("c"))
     => T
        </programlisting>
       </refsect1>