summaryrefslogtreecommitdiff
path: root/doc/ext_ffi_api.html
diff options
context:
space:
mode:
authorMike Pall <mike>2011-05-09 11:51:19 +0200
committerMike Pall <mike>2011-05-09 11:52:54 +0200
commitd9c1f771a7575510a9612e0a67be6c61d83de982 (patch)
tree2720ba6f2288adbd9a84c178d10c228803e144bf /doc/ext_ffi_api.html
parent868ecad32ba7fb3eb763642e22ebb06938fdb359 (diff)
downloadluajit2-d9c1f771a7575510a9612e0a67be6c61d83de982.tar.gz
FFI: Allow setting errno with ffi.errno(), too.
Diffstat (limited to 'doc/ext_ffi_api.html')
-rw-r--r--doc/ext_ffi_api.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/ext_ffi_api.html b/doc/ext_ffi_api.html
index 2d69cb49..e865a5f7 100644
--- a/doc/ext_ffi_api.html
+++ b/doc/ext_ffi_api.html
@@ -336,14 +336,16 @@ objects.
<h2 id="util">Utility Functions</h2>
-<h3 id="ffi_errno"><tt>err = ffi.errno()</tt></h3>
+<h3 id="ffi_errno"><tt>err = ffi.errno([newerr])</tt></h3>
<p>
Returns the error number set by the last C&nbsp;function call which
-indicated an error condition.
+indicated an error condition. If the optional <tt>newerr</tt> argument
+is present, the error number is set to the new value and the previous
+value is returned.
</p>
<p>
-This function offers a portable and OS-independent way to get the error
-number. Note that only <em>some</em> C&nbsp;functions set the error
+This function offers a portable and OS-independent way to get and set the
+error number. Note that only <em>some</em> C&nbsp;functions set the error
number. And it's only significant if the function actually indicated an
error condition (e.g. with a return value of <tt>-1</tt> or
<tt>NULL</tt>). Otherwise, it may or may not contain any previously set