diff options
author | Mike Pall <mike> | 2011-02-07 23:49:27 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2011-02-07 23:49:27 +0100 |
commit | 7a37b93f1b40ba83cc68965b1c80c35363c1493d (patch) | |
tree | d60ad18e47839b3998e1191672249735c46a99cc /doc/ext_ffi_api.html | |
parent | fb53d4aeb7590e0e8437b03589ef68adf4611570 (diff) | |
download | luajit2-7a37b93f1b40ba83cc68965b1c80c35363c1493d.tar.gz |
FFI: Record ffi.copy() and ffi.fill().
Diffstat (limited to 'doc/ext_ffi_api.html')
-rw-r--r-- | doc/ext_ffi_api.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/ext_ffi_api.html b/doc/ext_ffi_api.html index f0c4de90..7c2e53dd 100644 --- a/doc/ext_ffi_api.html +++ b/doc/ext_ffi_api.html @@ -312,13 +312,13 @@ is converted to a <tt>"const void *"</tt>. </p> <p> In the first syntax, <tt>len</tt> gives the number of bytes to copy. -In case <tt>src</tt> is a Lua string, the maximum copy length is the -number of bytes of the string plus a zero-terminator. Caveat: the -copied data may not be zero-terminated if <tt>len ≤ #src</tt>. +Caveat: if <tt>src</tt> is a Lua string, then <tt>len</tt> must not +exceed <tt>#src+1</tt>. </p> <p> In the second syntax, the source of the copy must be a Lua string. All -bytes of the string plus a zero-terminator are copied to <tt>dst</tt>. +bytes of the string <em>plus a zero-terminator</em> are copied to +<tt>dst</tt> (i.e. <tt>#src+1</tt> bytes). </p> <p> Performance notice: <tt>ffi.copy()</tt> may be used as a faster |