FFI: Allow setting errno with ffi.errno(), too.
This commit is contained in:
@@ -545,7 +545,10 @@ LJLIB_CF(ffi_offsetof)
|
||||
|
||||
LJLIB_CF(ffi_errno)
|
||||
{
|
||||
setintV(L->top++, errno);
|
||||
int err = errno;
|
||||
if (L->top > L->base)
|
||||
errno = ffi_checkint(L, 1);
|
||||
setintV(L->top++, err);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user