diff options
author | Mike Pall <mike> | 2011-11-15 16:45:36 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2011-11-15 16:45:36 +0100 |
commit | e549ffcbeb03a98c13816ef5a37425e186cf9ead (patch) | |
tree | 3e90aead960b3fc5005d66814e5de8202469d4d2 /doc | |
parent | b1efcef745b474f49dd9b0af61f771ccbc678b3c (diff) | |
download | luajit-e549ffcbeb03a98c13816ef5a37425e186cf9ead.tar.gz luajit-e549ffcbeb03a98c13816ef5a37425e186cf9ead.tar.bz2 luajit-e549ffcbeb03a98c13816ef5a37425e186cf9ead.zip |
FFI: Fix EnumWindows example in docs.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ext_ffi_semantics.html | 2 |
1 files changed, 2 insertions, 0 deletions
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); | |||
875 | local count = 0 | 875 | local count = 0 |
876 | ffi.C.EnumWindows(function(hwnd, l) | 876 | ffi.C.EnumWindows(function(hwnd, l) |
877 | count = count + 1 | 877 | count = count + 1 |
878 | return true | ||
878 | end, 0) | 879 | end, 0) |
879 | -- The callback is permanent and its resources cannot be reclaimed! | 880 | -- The callback is permanent and its resources cannot be reclaimed! |
880 | -- Ok, so this may not be a problem, if you do this only once. | 881 | -- Ok, so this may not be a problem, if you do this only once. |
@@ -898,6 +899,7 @@ on the cdata object: | |||
898 | local count = 0 | 899 | local count = 0 |
899 | local cb = ffi.cast("WNDENUMPROC", function(hwnd, l) | 900 | local cb = ffi.cast("WNDENUMPROC", function(hwnd, l) |
900 | count = count + 1 | 901 | count = count + 1 |
902 | return true | ||
901 | end) | 903 | end) |
902 | 904 | ||
903 | -- Pass it to a C function. | 905 | -- Pass it to a C function. |