struct Novika::FFI::I32

Overview

Type-side and value-side representation of Int32.

Included Modules

Extended Modules

Defined in:

novika/ffi.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module Novika::FFI::ForeignValue

box : Pointer(Void) box, must_be_of(type : ForeignType) must_be_of, to_form? : Form | Nil to_form?, write_to!(base : Pointer(Void)) : Pointer(Void) write_to!

Constructor Detail

def self.new(decimal) #

Class Method Detail

def self.alloc : Pointer(Void) #

def self.from?(form : Decimal) #

def self.matches?(value : I32) : Bool #

def self.to_ffi_type : Crystal::FFI::Type #

def self.to_s(io) #

def self.unbox(box : Pointer(Void)) : ForeignValue #

Instance Method Detail

def ==(other : self) #

def box : Pointer(Void) #
Description copied from module Novika::FFI::ForeignValue

Wraps this value in a void pointer.


def hash(hasher) #
Description copied from struct Struct

See Object#hash(hasher)


def to_crystal : Int32 #

def to_form? : Form | Nil #
Description copied from module Novika::FFI::ForeignValue

Determines the best form type to represent this foreign value, then builds and returns a form of that type.

Returns nil if value is nothing.


def to_s(io) #

def write_to!(base : Pointer(Void)) : Pointer(Void) #
Description copied from module Novika::FFI::ForeignValue

Writes this value starting at the given base pointer. Returns the base pointer.