### Home Classes Methods

### In Files

- ext/ffi_c/ffi.c

### Methods

- ::error
- ::error=

### Files

- Makefile
- LICENSE
- compile
- configure
- depcomp
- stamp-vti
- install-sh
- libtool-version
- mdate-sh
- missing

### Class/Module Index

Quicksearch

- FFI
- FFI::AbstractMemory
- FFI::ArrayType
- FFI::AutoPointer
- FFI::AutoPointer::CallableReleaser
- FFI::AutoPointer::DefaultReleaser
- FFI::AutoPointer::Releaser
- FFI::Buffer
- FFI::ConstGenerator
- FFI::ConstGenerator::Constant
- FFI::DataConverter
- FFI::DynamicLibrary
- FFI::DynamicLibrary::Symbol
- FFI::Enum
- FFI::Enums
- FFI::Function
- FFI::FunctionType
- FFI::Generator
- FFI::Generator::Task
- FFI::IO
- FFI::LastError
- FFI::ManagedStruct
- FFI::MemoryPointer
- FFI::NullPointerError
- FFI::Platform
- FFI::PlatformError
- FFI::Pointer
- FFI::StrPtrConverter
- FFI::Struct
- FFI::Struct::ManagedStructConverter
- FFI::StructByReference
- FFI::StructByValue
- FFI::StructGenerator
- FFI::StructGenerator::Field
- FFI::StructLayout
- FFI::StructLayout::Array
- FFI::StructLayout::Enum
- FFI::StructLayout::Field
- FFI::StructLayout::Function
- FFI::StructLayout::InnerStruct
- FFI::StructLayout::Mapped
- FFI::StructLayout::Number
- FFI::StructLayout::Pointer
- FFI::StructLayout::String
- FFI::StructLayoutBuilder
- FFI::TypesGenerator
- FFI::Union
- FFI::VariadicInvoker

No matching classes.

# FFI::LastError

This module defines a couple of method to set and get `errno` for current thread.

### Public Class Methods

error click to toggle source
@return [Numeric]
Get +errno+ value.

    static VALUE
    get_last_error(VALUE self)
    {
        return INT2NUM(thread_data_get()->td_errno);
    }

error(error) click to toggle source
@param [Numeric] error
@return [nil]
Set +errno+ value.

    static VALUE
    set_last_error(VALUE self, VALUE error)
    {

    #ifdef _WIN32
        SetLastError(NUM2INT(error));
    #else
        errno = NUM2INT(error);
    #endif

        return Qnil;
    }

[Validate]

Generated with the Darkfish Rdoc Generator 2.