Fix typo in comment.
[cffi.git] / PORTING
blob3dc06b463dae7b2a00f97130a8f0af151f476bf2
2 Porting CFFI to other Lisp implementations (incomplete):
4 - Create a cffi-otherlisp.lisp source file to contain the platform
5   specific functions you are about to add.
7 - Functions you must define in CFFI-SYS:
9   Function: FOREIGN-ALLOC size
11     Allocate SIZE bytes of memory and return a foreign pointer.
13   Function: FOREIGN-FREE ptr
15     Free memory allocated by FOREIGN-ALLOC.
17   Macro: WITH-FOREIGN-PTR (var size &optional size-var) &body body
19     Bind VAR to SIZE bytes of stack-consed memory during BODY.  If the
20     implementation cannot support stack allocation, the macro may
21     allocate the memory on the heap using FOREIGN-ALLOC /
22     FOREIGN-FREE.  If SIZE-VAR is supplied it will be bound to SIZE.
24   Function: NULL-PTR
26     Return a null pointer.
28   Function: NULL-PTR-P ptr
30     Return true if PTR is a null pointer.
32   Accessor: MEM-REF-U8 ptr &optional (offset 0)
33   Accessor: MEM-REF-S8 ptr &optional (offset 0)
34   Accessor: MEM-REF-U16 ptr &optional (offset 0)
35   Accessor: MEM-REF-S16 ptr &optional (offset 0)
36   Accessor: MEM-REF-U32 ptr &optional (offset 0)
37   Accessor: MEM-REF-S32 ptr &optional (offset 0)
38   Accessor: MEM-REF-FLOAT ptr &optional (offset 0)
39   Accessor: MEM-REF-DOUBLE ptr &optional (offset 0)
40   Accessor: MEM-REF-PTR ptr &optional (offset 0)
42     Low-level functions for dereferencing a pointer to various
43     primitive foreign types.
45   Macro: %FOREIGN-FUNCALL function-name &rest args