class Rubellite::Spinel::NativeFunction

Overview

Represents a compiled native function from a Spinel module

Defined in:

rubellite/spinel.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, lib_handle : Pointer(Void), fn_ptr : Pointer(Void), return_type_name : String = "Int64") #

[View source]

Instance Method Detail

def call(*args) #

High-performance direct C-ABI invocation Dispatches dynamically based on configured return type


[View source]
def call_as(type : T.class, *args) : T forall T #

[View source]
def call_bool(*args) : Bool #

[View source]
def call_f32(*args) : Float32 #

[View source]
def call_f64(*args) : Float64 #

[View source]
def call_i32(*args) : Int32 #

[View source]
def call_i64(*args) : Int64 #

[View source]
def call_ptr(*args) : Pointer(Void) #

[View source]
def call_u32(*args) : UInt32 #

[View source]
def call_u64(*args) : UInt64 #

[View source]
def call_void(*args) : Nil #

[View source]
def fn_ptr : Pointer(Void) #

[View source]
def lib_handle : Pointer(Void) #

[View source]
def name : String #

[View source]
def return_type_name : String #

[View source]