X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=doc%2Fref.sgml;h=aaf1feac499abe4fde3a6c841017de27e7a7328e;hb=8f3d2ca349d5e9848438b5545e83a0f1d41c9f38;hp=81c75aad198724057b3791d17134ef4787403350;hpb=d9322041cff941cfa0ee5a4a916259177b6dbe61;p=uffi.git diff --git a/doc/ref.sgml b/doc/ref.sgml index 81c75aa..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. @@ -344,7 +326,9 @@ always need to have memory for them. def-function name args &key module returning - Arguments and Values + + + Arguments and Values name @@ -375,7 +359,7 @@ foreign function. - + Description Declares a foreign function. @@ -417,7 +401,7 @@ foreign function. Syntax - load-foreign-library filename module supporting-libraries => success + load-foreign-library filename &key module supporting-libraries => success @@ -427,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. @@ -468,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