aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/ext_ffi_semantics.html23
1 files changed, 16 insertions, 7 deletions
diff --git a/doc/ext_ffi_semantics.html b/doc/ext_ffi_semantics.html
index ed32d23f..afe7e613 100644
--- a/doc/ext_ffi_semantics.html
+++ b/doc/ext_ffi_semantics.html
@@ -250,19 +250,20 @@ constant values; retrieving return values from C calls:
250<tr class="even separate"> 250<tr class="even separate">
251<td class="convin"><tt>bool</tt></td><td class="convop">0 &rarr; <tt>false</tt>, otherwise <tt>true</tt></td><td class="convout">boolean</td></tr> 251<td class="convin"><tt>bool</tt></td><td class="convop">0 &rarr; <tt>false</tt>, otherwise <tt>true</tt></td><td class="convout">boolean</td></tr>
252<tr class="odd separate"> 252<tr class="odd separate">
253<td class="convin">Complex number</td><td class="convop">boxed value</td><td class="convout">complex cdata</td></tr> 253<td class="convin"><tt>enum</tt></td><td class="convop">boxed value</td><td class="convout">enum cdata</td></tr>
254<tr class="even"> 254<tr class="even">
255<td class="convin">Vector</td><td class="convop">boxed value</td><td class="convout">vector cdata</td></tr> 255<td class="convin">Complex number</td><td class="convop">boxed value</td><td class="convout">complex cdata</td></tr>
256<tr class="odd"> 256<tr class="odd">
257<td class="convin">Vector</td><td class="convop">boxed value</td><td class="convout">vector cdata</td></tr>
258<tr class="even">
257<td class="convin">Pointer</td><td class="convop">boxed value</td><td class="convout">pointer cdata</td></tr> 259<td class="convin">Pointer</td><td class="convop">boxed value</td><td class="convout">pointer cdata</td></tr>
258<tr class="even separate"> 260<tr class="odd separate">
259<td class="convin">Array</td><td class="convop">boxed reference</td><td class="convout">reference cdata</td></tr> 261<td class="convin">Array</td><td class="convop">boxed reference</td><td class="convout">reference cdata</td></tr>
260<tr class="odd"> 262<tr class="even">
261<td class="convin"><tt>struct</tt>/<tt>union</tt></td><td class="convop">boxed reference</td><td class="convout">reference cdata</td></tr> 263<td class="convin"><tt>struct</tt>/<tt>union</tt></td><td class="convop">boxed reference</td><td class="convout">reference cdata</td></tr>
262</table> 264</table>
263<p> 265<p>
264Bitfields or <tt>enum</tt> types are treated like their underlying 266Bitfields are treated like their underlying type.
265type.
266</p> 267</p>
267<p> 268<p>
268Reference types are dereferenced <em>before</em> a conversion can take 269Reference types are dereferenced <em>before</em> a conversion can take
@@ -715,6 +716,10 @@ is performed. Otherwise both sides are converted to an
715<tt>int64_t</tt> and a signed arithmetic operation is performed. The 716<tt>int64_t</tt> and a signed arithmetic operation is performed. The
716result is a boxed 64&nbsp;bit cdata object.<br> 717result is a boxed 64&nbsp;bit cdata object.<br>
717 718
719If one of the operands is an <tt>enum</tt> and the other operand is a
720string, the string is converted to the value of a matching <tt>enum</tt>
721constant before the above conversion.<br>
722
718These rules ensure that 64&nbsp;bit integers are "sticky". Any 723These rules ensure that 64&nbsp;bit integers are "sticky". Any
719expression involving at least one 64&nbsp;bit integer operand results 724expression involving at least one 64&nbsp;bit integer operand results
720in another one. The undefined cases for the division, modulo and power 725in another one. The undefined cases for the division, modulo and power
@@ -740,7 +745,11 @@ cdata number and a Lua number can be compared with each other. If one
740of them is an <tt>uint64_t</tt>, the other side is converted to an 745of them is an <tt>uint64_t</tt>, the other side is converted to an
741<tt>uint64_t</tt> and an unsigned comparison is performed. Otherwise 746<tt>uint64_t</tt> and an unsigned comparison is performed. Otherwise
742both sides are converted to an <tt>int64_t</tt> and a signed 747both sides are converted to an <tt>int64_t</tt> and a signed
743comparison is performed.</li> 748comparison is performed.<br>
749
750If one of the operands is an <tt>enum</tt> and the other operand is a
751string, the string is converted to the value of a matching <tt>enum</tt>
752constant before the above conversion.<br>
744 753
745<li><b>Comparisons for equality/inequality</b> never raise an error. 754<li><b>Comparisons for equality/inequality</b> never raise an error.
746Even incompatible pointers can be compared for equality by address. Any 755Even incompatible pointers can be compared for equality by address. Any