From e985aeda84d8af63c4bfaa176c3312dfb2f7f230 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Thu, 20 Jan 2011 22:14:17 +0100 Subject: FFI: Add preliminary FFI documentation (still incomplete). --- doc/ext_ffi_tutorial.html | 91 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 doc/ext_ffi_tutorial.html (limited to 'doc/ext_ffi_tutorial.html') diff --git a/doc/ext_ffi_tutorial.html b/doc/ext_ffi_tutorial.html new file mode 100644 index 00000000..11e83339 --- /dev/null +++ b/doc/ext_ffi_tutorial.html @@ -0,0 +1,91 @@ + + + +FFI Tutorial + + + + + + + + +
+Lua +
+ + +
+

+TODO +

+ +

Loading the FFI Library

+

+The FFI library is built into LuaJIT by default, but it's not loaded +and initialized by default. The suggested way to use the FFI library +is to add the following to the start of every Lua file that needs one +of its functions: +

+
+local ffi = require("ffi")
+
+

+Please note this doesn't define an ffi variable in the table +of globals — you really need to use the local variable. The +require function ensures the library is only loaded once. +

+ +

TODO

+
+
+ + + -- cgit v1.2.3-55-g6feb