Module FFI
In: lib/ffi/autopointer.rb
lib/ffi/types.rb
lib/ffi/errno.rb
lib/ffi/pointer.rb
lib/ffi/struct.rb
lib/ffi/struct_layout_builder.rb
lib/ffi/io.rb
lib/ffi/library.rb
lib/ffi/enum.rb
lib/ffi/platform.rb
lib/ffi/managedstruct.rb
lib/ffi/union.rb
lib/ffi/tools/generator.rb
lib/ffi/tools/types_generator.rb
lib/ffi/tools/struct_generator.rb
lib/ffi/tools/const_generator.rb
lib/ffi/variadic.rb

Copyright (C) 2008, 2009 Wayne Meissner Copyright (C) 2009 Luc Heinrich All rights reserved.

This file is part of ruby-ffi.

This code is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 only, as published by the Free Software Foundation.

This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License version 3 for more details.

You should have received a copy of the GNU Lesser General Public License version 3 along with this work. If not, see <www.gnu.org/licenses/>.

Methods

Classes and Modules

Module FFI::IO
Module FFI::Library
Module FFI::Platform
Class FFI::AutoPointer
Class FFI::ConstGenerator
Class FFI::Enum
Class FFI::Enums
Class FFI::Generator
Class FFI::ManagedStruct
Class FFI::NotFoundError
Class FFI::PlatformError
Class FFI::Pointer
Class FFI::StrPtrConverter
Class FFI::Struct
Class FFI::StructGenerator
Class FFI::StructLayout
Class FFI::StructLayoutBuilder
Class FFI::TypesGenerator
Class FFI::Union
Class FFI::VariadicInvoker

Constants

CURRENT_PROCESS = USE_THIS_PROCESS_AS_LIBRARY = Object.new
ARCH = case CPU.downcase

Public Class methods

@return (see FFI::LastError.error) @see FFI::LastError.error

@param error (see FFI::LastError.error=) @return (see FFI::LastError.error=) @see FFI::LastError.error=

@param [Type, DataConverter, Symbol] name @param [Hash] type_map if nil, {FFI::TypeDefs} is used @return [Type] Find a type in type_map ({FFI::TypeDefs}, by default) from a type objet, a type name (symbol). If name is a {DataConverter}, a new {Type::Mapped} is created.

@param [to_s] lib library name @return [String] library name formatted for current platform Transform a generic library name to a platform library name @example

 # Linux
 FFI.map_library_name 'c'     # -> "libc.so.6"
 FFI.map_library_name 'jpeg'  # -> "libjpeg.so"
 # Windows
 FFI.map_library_name 'c'     # -> "msvcrt.dll"
 FFI.map_library_name 'jpeg'  # -> "jpeg.dll"

@param type type is an instance of class accepted by {FFI.find_type} @return [Numeric] Get type size, in bytes.

@param [Type, DataConverter, Symbol] old type definition used by {FFI.find_type} @param [Symbol] add new type definition‘s name to add @return [Type] Add a definition type to type definitions.

[Validate]