Class: FFI::Pointer
- Inherits:
-
Object
- Object
- FFI::Pointer
- Defined in:
- lib/mpvlib/ffi_additions.rb
Instance Method Summary collapse
Instance Method Details
#read_array_of_strings(num = nil) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/mpvlib/ffi_additions.rb', line 5 def read_array_of_strings(num=nil) elements = [] loc = self until (element = loc.read_pointer).null? elements << element.read_string loc += FFI::Type::POINTER.size break if num && elements.length == num end elements end |