1.5 KiB
- last thing to do
- Add tests
- Add docs
- Typing
pragma pack?
Raw
- Raw:toRef()
- Raw:toBox()
- Raw:intoBox()
- Raw:intoRef()
Box
-
ffi.box(size)
-
.size
-
:zero()
-
:ref(offset?=0) => ref
-
tostring
-
[~] :copy(box,size?=-1,offset?=0)
- working on it
Ref (Unsafe)
-
high, low Boundaries
-
iter
-
ref:deref() -> ref
-
ref:offset(bytes) -> ref
-
ref:ref() -> ref
- [ ] ref:fromRef(size,offset?=0) ?? what is this
- [ ] ref:fromBox(size,offset?=0) ?? what is this
Struct
- :offset(index)
- :ptr()
- .inner[n]
- [!] .size
- #
- tostring
size, offset is strange. maybe related to cif state.
Type
- :toBox(luavalue)
Very stupid idea. from(box|ref|raw, offset) is better idea i think.
-
:fromBox(box,offset?=0)
-
:intoBox(luavalue,box,offset?=0)
-
:fromRef(ref,offset?=0)
-
:intoRef(luavalue,ref,offset?=0)
-
:fromRaw(raw,offset?=0)
-
:castBox(box,type) TODO
-
:sum
-
:mul
-
:sub
subtype
- :ptr() -> Ptr
- [~] :arr(len) -> Arr
- .size
Ptr
- .inner
- .size
- :ptr()
- [~] :arr()
Arr
Void
ffi.void
Zero sized type.
Fn
Prototype type of some function. converts lua function into native function pointer or native function pointer into lua function.
ffi.fn({ type }, type) -> fn
:toLua( ref ) -> luafunction :toBox( luafunction ) -> ref
TODO: rust, and another ABI support