module Novika::FFI::ForeignValue
Overview
Base type for Novika FFI values (both heap & stack allocated).
Direct including types
- Novika::FFI::Cchar
- Novika::FFI::Cstr
- Novika::FFI::F32
- Novika::FFI::F64
- Novika::FFI::I16
- Novika::FFI::I32
- Novika::FFI::I64
- Novika::FFI::I8
- Novika::FFI::Nothing
- Novika::FFI::StructView
- Novika::FFI::U16
- Novika::FFI::U32
- Novika::FFI::U64
- Novika::FFI::U8
- Novika::FFI::UntypedPointer
Defined in:
novika/ffi.crInstance Method Summary
-
#box : Pointer(Void)
Wraps this value in a void pointer.
-
#must_be_of(type : ForeignType)
Raises if this value is not of the given
ForeignType
type. -
#to_form? : Form | Nil
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
-
#write_to!(base : Pointer(Void)) : Pointer(Void)
Writes this value starting at the given base pointer.
Instance Method Detail
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.
abstract
def write_to!(base : Pointer(Void)) : Pointer(Void)
#
Writes this value starting at the given base pointer. Returns the base pointer.