Class: WASI::CIOVec
Instance Attribute Summary collapse
-
#ciovs ⇒ Object
readonly
Returns the value of attribute ciovs.
Instance Method Summary collapse
- #<<(string) ⇒ Object
- #free ⇒ Object
-
#initialize(n) ⇒ CIOVec
constructor
A new instance of CIOVec.
Constructor Details
Instance Attribute Details
#ciovs ⇒ Object (readonly)
Returns the value of attribute ciovs.
23 24 25 |
# File 'lib/rlang/lib/wasi.rb', line 23 def ciovs @ciovs end |
Instance Method Details
#<<(string) ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/rlang/lib/wasi.rb', line 35 def << (string) arg string: :String result :CIOVec raise "CIOVec full !" if @index >= @max_index @ciovs[@index] = string.ptr @ciovs[@index+1] = string.length @index += 2 self end |