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 ce6313d7..3444b8fb 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> |
@@ -177,6 +179,8 @@ a <tt>typedef</tt>, except re-declarations will be ignored): | |||
177 | <tt>uint16_t</tt>, <tt>uint32_t</tt>, <tt>uint64_t</tt>, | 179 | <tt>uint16_t</tt>, <tt>uint32_t</tt>, <tt>uint64_t</tt>, |
178 | <tt>intptr_t</tt>, <tt>uintptr_t</tt>.</li> | 180 | <tt>intptr_t</tt>, <tt>uintptr_t</tt>.</li> |
179 | 181 | ||
182 | <li>From <tt><unistd.h></tt> (POSIX): <tt>ssize_t</tt>.</li> | ||
183 | |||
180 | </ul> | 184 | </ul> |
181 | <p> | 185 | <p> |
182 | You're encouraged to use these types in preference to | 186 | You're encouraged to use these types in preference to |
@@ -724,6 +728,22 @@ You'll have to explicitly convert a 64 bit integer to a Lua | |||
724 | number (e.g. for regular floating-point calculations) with | 728 | number (e.g. for regular floating-point calculations) with |
725 | <tt>tonumber()</tt>. But note this may incur a precision loss.</li> | 729 | <tt>tonumber()</tt>. But note this may incur a precision loss.</li> |
726 | 730 | ||
731 | <li><b>64 bit bitwise operations</b>: the rules for 64 bit | ||
732 | arithmetic operators apply analogously.<br> | ||
733 | |||
734 | Unlike the other <tt>bit.*</tt> operations, <tt>bit.tobit()</tt> | ||
735 | converts a cdata number via <tt>int64_t</tt> to <tt>int32_t</tt> and | ||
736 | returns a Lua number.<br> | ||
737 | |||
738 | For <tt>bit.band()</tt>, <tt>bit.bor()</tt> and <tt>bit.bxor()</tt>, the | ||
739 | conversion to <tt>int64_t</tt> or <tt>uint64_t</tt> applies to | ||
740 | <em>all</em> arguments, if <em>any</em> argument is a cdata number.<br> | ||
741 | |||
742 | For all other operations, only the first argument is used to determine | ||
743 | the output type. This implies that a cdata number as a shift count for | ||
744 | shifts and rotates is accepted, but that alone does <em>not</em> cause | ||
745 | a cdata number output. | ||
746 | |||
727 | </ul> | 747 | </ul> |
728 | 748 | ||
729 | <h3 id="cdata_comp">Comparisons of cdata objects</h3> | 749 | <h3 id="cdata_comp">Comparisons of cdata objects</h3> |
@@ -1195,14 +1215,12 @@ The following operations are currently not compiled and may exhibit | |||
1195 | suboptimal performance, especially when used in inner loops: | 1215 | suboptimal performance, especially when used in inner loops: |
1196 | </p> | 1216 | </p> |
1197 | <ul> | 1217 | <ul> |
1198 | <li>Bitfield accesses and initializations.</li> | ||
1199 | <li>Vector operations.</li> | 1218 | <li>Vector operations.</li> |
1200 | <li>Table initializers.</li> | 1219 | <li>Table initializers.</li> |
1201 | <li>Initialization of nested <tt>struct</tt>/<tt>union</tt> types.</li> | 1220 | <li>Initialization of nested <tt>struct</tt>/<tt>union</tt> types.</li> |
1202 | <li>Allocations of variable-length arrays or structs.</li> | 1221 | <li>Non-default initialization of VLA/VLS or large C types |
1203 | <li>Allocations of C types with a size > 128 bytes or an | 1222 | (> 128 bytes or > 16 array elements.</li> |
1204 | alignment > 8 bytes.</li> | 1223 | <li>Bitfield initializations.</li> |
1205 | <li>Conversions from lightuserdata to <tt>void *</tt>.</li> | ||
1206 | <li>Pointer differences for element sizes that are not a power of | 1224 | <li>Pointer differences for element sizes that are not a power of |
1207 | two.</li> | 1225 | two.</li> |
1208 | <li>Calls to C functions with aggregates passed or returned by | 1226 | <li>Calls to C functions with aggregates passed or returned by |
@@ -1218,7 +1236,6 @@ value.</li> | |||
1218 | Other missing features: | 1236 | Other missing features: |
1219 | </p> | 1237 | </p> |
1220 | <ul> | 1238 | <ul> |
1221 | <li>Bit operations for 64 bit types.</li> | ||
1222 | <li>Arithmetic for <tt>complex</tt> numbers.</li> | 1239 | <li>Arithmetic for <tt>complex</tt> numbers.</li> |
1223 | <li>Passing structs by value to vararg C functions.</li> | 1240 | <li>Passing structs by value to vararg C functions.</li> |
1224 | <li><a href="extensions.html#exceptions">C++ exception interoperability</a> | 1241 | <li><a href="extensions.html#exceptions">C++ exception interoperability</a> |