Class: FFI::Pointer
- Inherits:
-
Object
- Object
- FFI::Pointer
- Defined in:
- lib/net/proto/common.rb
Overview
Reopen the FFI::Pointer class and add our own method.
Instance Method Summary collapse
Instance Method Details
#read_array_of_string ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/net/proto/common.rb', line 37 def read_array_of_string elements = [] loc = self until (element = loc.read_pointer).null? elements << element.read_string loc += FFI::Type::POINTER.size end elements end |