From d9c1f771a7575510a9612e0a67be6c61d83de982 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Mon, 9 May 2011 11:51:19 +0200 Subject: FFI: Allow setting errno with ffi.errno(), too. --- doc/ext_ffi_api.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'doc') 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.

Utility Functions

-

err = ffi.errno()

+

err = ffi.errno([newerr])

Returns the error number set by the last C function call which -indicated an error condition. +indicated an error condition. If the optional newerr argument +is present, the error number is set to the new value and the previous +value is returned.

-This function offers a portable and OS-independent way to get the error -number. Note that only some C functions set the error +This function offers a portable and OS-independent way to get and set the +error number. Note that only some C 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 -1 or NULL). Otherwise, it may or may not contain any previously set -- cgit v1.2.3-55-g6feb