Class: FFI::Pointer
- Inherits:
-
Object
- Object
- FFI::Pointer
- Defined in:
- lib/sys/admin/custom.rb
Overview
Re-open the FFI::Pointer class to add a custom method.
Instance Method Summary collapse
Instance Method Details
#read_array_of_string ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/sys/admin/custom.rb', line 7 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 |