io/foreign
Higher-level wrappers around the LuaJIT ffi module.
(define-foreign-function name lambda-list do-errno-check)
Macro defined at lib/io/foreign.lisp:8:2
Define a foreign function wrapper for the C symbol NAME, taking
arguments LAMBDA-LIST.
Additionally, if DO-ERRNO-CHECK is true or a number, assume that
negative return values (or the number, if given) signal an error
condition, and raise an exception with the message determined by
strerror(3).
The symbol NAME will be mangled by replacing -s with _s. If this
is undesirable, you may give an argument of the form (quote foo),
in which foo will not be mangled.
Example:
> (ffi/cdef "char *get_current_dir_name(void);")
out = nil
> (define-foreign-function get-current-dir-name () 0)
out = function: 0x42e22188
> (get-current-dir-name)
out = cdata<char *>: 0x00d26610
> (ffi/string (get-current-dir-name))
out = "/home/hydraz/Projects/urn/compiler"
(define-foreign-functions c-definitions &functions)
Macro defined at lib/io/foreign.lisp:61:2
Declare all the foreign functions specified in C-DEFINITIONS, and
additionally build the wrappers as described in FUNCTIONS, using
define-foreign-function
(ffi/defun-ffi name typedecl)
Macro defined at lib/luajit/ffi.lisp:22:2
Warning: ffi/defun-ffi is deprecated: Use cdef and index the
Ctable directly
Define the external symbol NAME with the C type signature
given by TYPEDECL.
Undocumented symbols
- CNative defined at lib/luajit/ffi.lisp:19:1
- bit/arshiftNative defined at lib/luajit/bit.lisp:9:1
- bit/bandNative defined at lib/luajit/bit.lisp:4:1
- bit/bnotNative defined at lib/luajit/bit.lisp:3:1
- bit/borNative defined at lib/luajit/bit.lisp:5:1
- bit/bswapNative defined at lib/luajit/bit.lisp:12:1
- bit/bxorNative defined at lib/luajit/bit.lisp:6:1
- bit/lshiftNative defined at lib/luajit/bit.lisp:7:1
- bit/rolNative defined at lib/luajit/bit.lisp:10:1
- bit/rorNative defined at lib/luajit/bit.lisp:11:1
- bit/rshiftNative defined at lib/luajit/bit.lisp:8:1
- bit/tobitNative defined at lib/luajit/bit.lisp:1:1
- bit/tohexNative defined at lib/luajit/bit.lisp:2:1
- cdefNative defined at lib/luajit/ffi.lisp:8:1
- ffi/CNative defined at lib/luajit/ffi.lisp:19:1
- ffi/abiNative defined at lib/luajit/ffi.lisp:9:1
- ffi/alignofNative defined at lib/luajit/ffi.lisp:5:1
- ffi/archNative defined at lib/luajit/ffi.lisp:12:1
- ffi/castNative defined at lib/luajit/ffi.lisp:2:1
- ffi/cdefNative defined at lib/luajit/ffi.lisp:8:1
- ffi/copyNative defined at lib/luajit/ffi.lisp:11:1
- ffi/errnoNative defined at lib/luajit/ffi.lisp:18:1
- ffi/fillNative defined at lib/luajit/ffi.lisp:7:1
- ffi/gcNative defined at lib/luajit/ffi.lisp:17:1
- ffi/istypeNative defined at lib/luajit/ffi.lisp:6:1
- ffi/loadNative defined at lib/luajit/ffi.lisp:14:1
- ffi/metatypeNative defined at lib/luajit/ffi.lisp:10:1
- ffi/newNative defined at lib/luajit/ffi.lisp:1:1
- ffi/offsetofNative defined at lib/luajit/ffi.lisp:20:1
- ffi/osNative defined at lib/luajit/ffi.lisp:15:1
- ffi/sizeofNative defined at lib/luajit/ffi.lisp:4:1
- ffi/stringNative defined at lib/luajit/ffi.lisp:16:1
- ffi/typeinfoNative defined at lib/luajit/ffi.lisp:13:1
- ffi/typeofNative defined at lib/luajit/ffi.lisp:3:1
