From 7a37b93f1b40ba83cc68965b1c80c35363c1493d Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Mon, 7 Feb 2011 23:49:27 +0100 Subject: FFI: Record ffi.copy() and ffi.fill(). --- doc/ext_ffi_api.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/ext_ffi_api.html') 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 "const void *".

In the first syntax, len gives the number of bytes to copy. -In case src 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 len ≤ #src. +Caveat: if src is a Lua string, then len must not +exceed #src+1.

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 dst. +bytes of the string plus a zero-terminator are copied to +dst (i.e. #src+1 bytes).

Performance notice: ffi.copy() may be used as a faster -- cgit v1.2.3-55-g6feb