X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fref.sgml;h=aaf1feac499abe4fde3a6c841017de27e7a7328e;hb=bf5c7e7c36474375604bcbcedea8794a68dd1784;hp=39fa543ee0667c159d4f332f9094cf3afaadb0da;hpb=b0843e459729bfab3f5e7de657aeeb62ca302121;p=uffi.git
diff --git a/doc/ref.sgml b/doc/ref.sgml
index 39fa543..aaf1fea 100644
--- a/doc/ref.sgml
+++ b/doc/ref.sgml
@@ -27,45 +27,27 @@
-
- uffi-declare
-
- This is used wherever a declare
- expression can be placed. For example:
-
-
-
-(let ((my-structure (uffi:allocate-foreign-object 'a-struct)))
- (uffi:uffi-declare a-struct my-structure))
-
-
-
-
-
- slot-type
+
+ def-type
- This is used inside of defclass and
- defstruct 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:
-
+ This is used wherever a &cl; deftype
+ expression can be placed. Used to declare types to
+the compiler for optimization. Currently, on &cmucl; takes advantage
+of this.
-(eval
- `(defclass a-class ()
- ((char-ptr :type ,(uffi:slot-type (* :char))))))
+(uffi:def-type my-struct-def my-struct-foreign-type)
- Immediate Types
+ Primitive Types
Overview
- 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.
@@ -339,12 +321,12 @@ always need to have memory for them.
Macro
-
+
Syntax
-
+
def-function name args &key module returning
-
-
+
+
Arguments and Values
@@ -419,7 +401,7 @@ foreign function.
Syntax
- load-foreign-library filename module supporting-libraries => success
+ load-foreign-library filename &key module supporting-libraries => success
@@ -429,7 +411,8 @@ foreign function.
filename
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.
@@ -470,7 +453,9 @@ a session.
Examples
- (load-foreign-library #p"/usr/lib/libmysqlclient.so" "mysql" '("c"))
+ (load-foreign-library #p"/usr/lib/libmysqlclient.so"
+ :module "mysql"
+ :supporting-libraries '("c"))
=> T