Copyright (C) 2008-2010 Wayne Meissner
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/>.
ARCH | = | case CPU.downcase |
CURRENT_PROCESS | = | USE_THIS_PROCESS_AS_LIBRARY = Object.new |
@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.