From a98aede37772797b4471e1a094452051edff5862 Mon Sep 17 00:00:00 2001
From: Mike Pall
Date: Wed, 13 Mar 2013 22:44:01 +0100
Subject: FFI: Add 64 bit bitwise operations.
---
doc/ext_ffi_semantics.html | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
(limited to 'doc/ext_ffi_semantics.html')
diff --git a/doc/ext_ffi_semantics.html b/doc/ext_ffi_semantics.html
index 03229012..15c9a6db 100644
--- a/doc/ext_ffi_semantics.html
+++ b/doc/ext_ffi_semantics.html
@@ -730,6 +730,22 @@ You'll have to explicitly convert a 64 bit integer to a Lua
number (e.g. for regular floating-point calculations) with
tonumber(). But note this may incur a precision loss.
+64 bit bitwise operations: the rules for 64 bit
+arithmetic operators apply analogously.
+
+Unlike the other bit.* operations, bit.tobit()
+converts a cdata number via int64_t to int32_t and
+returns a Lua number.
+
+For bit.band(), bit.bor() and bit.bxor(), the
+conversion to int64_t or uint64_t applies to
+all arguments, if any argument is a cdata number.
+
+For all other operations, only the first argument is used to determine
+the output type. This implies that a cdata number as a shift count for
+shifts and rotates is accepted, but that alone does not cause
+a cdata number output.
+
Comparisons of cdata objects
@@ -1222,7 +1238,6 @@ value.
Other missing features:
-- Bit operations for 64 bit types.
- Arithmetic for complex numbers.
- Passing structs by value to vararg C functions.
- C++ exception interoperability
--
cgit v1.2.3-55-g6feb