struct Novika::FFI::UntypedPointer

Overview

Type-side and value-side representation of pointers.

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 : Hole) #

def self.from?(form : StructViewForm) #

def self.from?(form : Decimal) #

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

def self.none #

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 none? #

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.