From e549ffcbeb03a98c13816ef5a37425e186cf9ead Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Tue, 15 Nov 2011 16:45:36 +0100 Subject: [PATCH] FFI: Fix EnumWindows example in docs. --- doc/ext_ffi_semantics.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/ext_ffi_semantics.html b/doc/ext_ffi_semantics.html index 7e140e27..f3be0799 100644 --- a/doc/ext_ffi_semantics.html +++ b/doc/ext_ffi_semantics.html @@ -875,6 +875,7 @@ int EnumWindows(WNDENUMPROC func, intptr_t l); local count = 0 ffi.C.EnumWindows(function(hwnd, l) count = count + 1 + return true end, 0) -- The callback is permanent and its resources cannot be reclaimed! -- Ok, so this may not be a problem, if you do this only once. @@ -898,6 +899,7 @@ on the cdata object: local count = 0 local cb = ffi.cast("WNDENUMPROC", function(hwnd, l) count = count + 1 + return true end) -- Pass it to a C function.