struct Novika::FFI::Cchar
- Novika::FFI::Cchar
- Struct
- Value
- Object
Overview
Type-side and value-side representation of C char (a u8). In Novika, char is represented by a single-character quote.
Included Modules
Extended Modules
Defined in:
novika/ffi.crConstructors
Class Method Summary
- .alloc : Pointer(Void)
- .from?(form : Quote)
- .from?(form : Decimal)
- .matches?(value : Cchar)
- .to_ffi_type : Crystal::FFI::Type
- .to_s(io)
- .unbox(box : Pointer(Void)) : ForeignValue
Instance Method Summary
-
#box : Pointer(Void)
Wraps this value in a void pointer.
-
#to_crystal
Returns the corresponding Crystal character.
-
#to_form? : Form | Nil
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
- #to_s(io)
-
#write_to!(base : Pointer(Void)) : Pointer(Void)
Writes this value starting at the given base pointer.
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
Class Method Detail
Instance Method Detail
def box : Pointer(Void)
#
Description copied from module Novika::FFI::ForeignValue
Wraps this value in a void pointer.
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 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.