Sha256: c5e5634da442d85945d9122baffe78851eb61c3cd9da6af99924946ec78641dd

Contents?: true

Size: 248 Bytes

Versions: 17

Compression:

Stored size: 248 Bytes

Contents

require 'ffi'

class FFI::Pointer
  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
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
rslp-0.1.1 lib/slp/helper.rb
rslp-0.1.0 lib/slp/helper.rb
rslp-0.0.2 lib/slp/helper.rb
sys-admin-1.8.1 lib/sys/admin/custom.rb
sys-admin-1.8.0 lib/sys/admin/custom.rb
rslp-0.0.1 lib/slp/helper.rb
sys-admin-1.7.6 lib/sys/admin/custom.rb
sys-admin-1.7.5 lib/sys/admin/custom.rb
sys-admin-1.7.4 lib/sys/admin/custom.rb
sys-admin-1.7.3 lib/sys/admin/custom.rb
sys-admin-1.7.2 lib/sys/admin/custom.rb
sys-admin-1.7.1 lib/sys/admin/custom.rb
sys-admin-1.6.4 lib/sys/admin/custom.rb
sys-admin-1.6.3 lib/sys/admin/custom.rb
sys-admin-1.6.2 lib/sys/admin/custom.rb
sys-admin-1.6.1 lib/sys/admin/custom.rb
sys-admin-1.6.0 lib/sys/admin/custom.rb