struct Novika::Hole
- Novika::Hole
- Struct
- Value
- Object
Overview
Holes are similar to Crystal's uninitialized
or out
, in that
they allow you to allocate memory for a type, pass a pointer to
that memory to e.g. a C function, and let that C function write
into the memory. The written value can then be retrieved by
opening the hole.
Included Modules
Defined in:
novika/forms/foreign.crConstructors
Class Method Summary
Instance Method Summary
-
#address(*args, **options)
Returns the address of this hole's content in memory.
-
#address(*args, **options, &)
Returns the address of this hole's content in memory.
- #desc(io)
-
#handle : Pointer(Void)
Returns a pointer to this hole's content.
-
#on_open(engine : Engine) : self
Reacts to this form being opened with engine.
- #to_s(io)
Instance methods inherited from module Novika::Schedulable::ShouldOpenWhenScheduled
schedule!(engine : Engine, stack : Block)
schedule!
Instance methods inherited from module Novika::Form
a(type : T.class) : T forall T
a,
desc(io : IO)desc : String desc, die(details : String) die, effect(io)
effect effect, on_open(engine : Engine) : self on_open, on_parent_open(engine : Engine) : self on_parent_open, onto(block : Block) : self onto, sel(a, b) sel, to_quote : Quote to_quote