diff options
Diffstat (limited to 'doc/ext_ffi_semantics.html')
-rw-r--r-- | doc/ext_ffi_semantics.html | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/doc/ext_ffi_semantics.html b/doc/ext_ffi_semantics.html index a21e5bd5..40575af8 100644 --- a/doc/ext_ffi_semantics.html +++ b/doc/ext_ffi_semantics.html | |||
@@ -45,6 +45,8 @@ td.convop { font-style: italic; width: 40%; } | |||
45 | <a href="ext_jit.html">jit.* Library</a> | 45 | <a href="ext_jit.html">jit.* Library</a> |
46 | </li><li> | 46 | </li><li> |
47 | <a href="ext_c_api.html">Lua/C API</a> | 47 | <a href="ext_c_api.html">Lua/C API</a> |
48 | </li><li> | ||
49 | <a href="ext_profiler.html">Profiler</a> | ||
48 | </li></ul> | 50 | </li></ul> |
49 | </li><li> | 51 | </li><li> |
50 | <a href="status.html">Status</a> | 52 | <a href="status.html">Status</a> |
@@ -182,6 +184,8 @@ a <tt>typedef</tt>, except re-declarations will be ignored): | |||
182 | <tt>uint16_t</tt>, <tt>uint32_t</tt>, <tt>uint64_t</tt>, | 184 | <tt>uint16_t</tt>, <tt>uint32_t</tt>, <tt>uint64_t</tt>, |
183 | <tt>intptr_t</tt>, <tt>uintptr_t</tt>.</li> | 185 | <tt>intptr_t</tt>, <tt>uintptr_t</tt>.</li> |
184 | 186 | ||
187 | <li>From <tt><unistd.h></tt> (POSIX): <tt>ssize_t</tt>.</li> | ||
188 | |||
185 | </ul> | 189 | </ul> |
186 | <p> | 190 | <p> |
187 | You're encouraged to use these types in preference to | 191 | You're encouraged to use these types in preference to |
@@ -729,6 +733,22 @@ You'll have to explicitly convert a 64 bit integer to a Lua | |||
729 | number (e.g. for regular floating-point calculations) with | 733 | number (e.g. for regular floating-point calculations) with |
730 | <tt>tonumber()</tt>. But note this may incur a precision loss.</li> | 734 | <tt>tonumber()</tt>. But note this may incur a precision loss.</li> |
731 | 735 | ||
736 | <li><b>64 bit bitwise operations</b>: the rules for 64 bit | ||
737 | arithmetic operators apply analogously.<br> | ||
738 | |||
739 | Unlike the other <tt>bit.*</tt> operations, <tt>bit.tobit()</tt> | ||
740 | converts a cdata number via <tt>int64_t</tt> to <tt>int32_t</tt> and | ||
741 | returns a Lua number.<br> | ||
742 | |||
743 | For <tt>bit.band()</tt>, <tt>bit.bor()</tt> and <tt>bit.bxor()</tt>, the | ||
744 | conversion to <tt>int64_t</tt> or <tt>uint64_t</tt> applies to | ||
745 | <em>all</em> arguments, if <em>any</em> argument is a cdata number.<br> | ||
746 | |||
747 | For all other operations, only the first argument is used to determine | ||
748 | the output type. This implies that a cdata number as a shift count for | ||
749 | shifts and rotates is accepted, but that alone does <em>not</em> cause | ||
750 | a cdata number output. | ||
751 | |||
732 | </ul> | 752 | </ul> |
733 | 753 | ||
734 | <h3 id="cdata_comp">Comparisons of cdata objects</h3> | 754 | <h3 id="cdata_comp">Comparisons of cdata objects</h3> |
@@ -1200,14 +1220,12 @@ The following operations are currently not compiled and may exhibit | |||
1200 | suboptimal performance, especially when used in inner loops: | 1220 | suboptimal performance, especially when used in inner loops: |
1201 | </p> | 1221 | </p> |
1202 | <ul> | 1222 | <ul> |
1203 | <li>Bitfield accesses and initializations.</li> | ||
1204 | <li>Vector operations.</li> | 1223 | <li>Vector operations.</li> |
1205 | <li>Table initializers.</li> | 1224 | <li>Table initializers.</li> |
1206 | <li>Initialization of nested <tt>struct</tt>/<tt>union</tt> types.</li> | 1225 | <li>Initialization of nested <tt>struct</tt>/<tt>union</tt> types.</li> |
1207 | <li>Allocations of variable-length arrays or structs.</li> | 1226 | <li>Non-default initialization of VLA/VLS or large C types |
1208 | <li>Allocations of C types with a size > 128 bytes or an | 1227 | (> 128 bytes or > 16 array elements.</li> |
1209 | alignment > 8 bytes.</li> | 1228 | <li>Bitfield initializations.</li> |
1210 | <li>Conversions from lightuserdata to <tt>void *</tt>.</li> | ||
1211 | <li>Pointer differences for element sizes that are not a power of | 1229 | <li>Pointer differences for element sizes that are not a power of |
1212 | two.</li> | 1230 | two.</li> |
1213 | <li>Calls to C functions with aggregates passed or returned by | 1231 | <li>Calls to C functions with aggregates passed or returned by |
@@ -1223,7 +1241,6 @@ value.</li> | |||
1223 | Other missing features: | 1241 | Other missing features: |
1224 | </p> | 1242 | </p> |
1225 | <ul> | 1243 | <ul> |
1226 | <li>Bit operations for 64 bit types.</li> | ||
1227 | <li>Arithmetic for <tt>complex</tt> numbers.</li> | 1244 | <li>Arithmetic for <tt>complex</tt> numbers.</li> |
1228 | <li>Passing structs by value to vararg C functions.</li> | 1245 | <li>Passing structs by value to vararg C functions.</li> |
1229 | <li><a href="extensions.html#exceptions">C++ exception interoperability</a> | 1246 | <li><a href="extensions.html#exceptions">C++ exception interoperability</a> |