From 1f0006ac71fd4eb308ab900b0b9917e1dd046680 Mon Sep 17 00:00:00 2001
From: Mike Pall
Given that the FFI library is designed to interface with C code -and that declarations can be written in plain C syntax, it -closely follows the C language semantics, wherever possible. Some -minor concessions are needed for smoother interoperation with Lua +and that declarations can be written in plain C syntax, it +closely follows the C language semantics, wherever possible. +Some minor concessions are needed for smoother interoperation with Lua language semantics.
@@ -83,9 +83,8 @@ background. Please note: this is the first public release of the FFI library. This does not comprise the final specification for the FFI semantics, yet. Some of the semantics may need to be changed, based on feedback from -developers. Please report any problems -you've encountered or any improvements you'd like to see — thank -you! +developers. Please report any problems you +may encounter or any improvements you'd like to see — thank you!
-Reference types are immutable after initialization ("no reseating of
+Reference types are immutable after initialization ("no re-seating of
references"). For initialization purposes or when passing values to
reference parameters, they are treated like pointers. Note that unlike
in C++, there's no way to implement automatic reference generation of
@@ -652,8 +651,8 @@ variable argument part of vararg C function use
special conversion rules. This
C function is called and the return value (if any) is
converted to a Lua object.
-On Windows/x86 systems, stdcall functions are automatically
-detected and a function declared as cdecl (the default) is
+On Windows/x86 systems, __stdcall functions are automatically
+detected and a function declared as __cdecl (the default) is
silently fixed up after the first call.
@@ -790,7 +789,7 @@ local s = ffi.new("foo_t", a)
Similar rules apply for Lua strings which are implicitly converted to
"const char *": the string object itself must be
referenced somewhere or it'll be garbage collected eventually. The
-pointer will then point to stale data, which may have already beeen
+pointer will then point to stale data, which may have already been
overwritten. Note that string literals are automatically kept
alive as long as the function containing it (actually its prototype)
is not garbage collected.
@@ -951,7 +950,7 @@ storing and initializing them are supported, yet.
The JIT compiler already handles a large subset of all FFI operations. -- cgit v1.2.3-55-g6feb