class FFI::MemoryPointer

Public Class Methods

from_string(s) click to toggle source
# File lib/ffi/memorypointer.rb, line 26
def self.from_string(s)
  ptr = self.new(s.bytesize + 1, 1, false)
  ptr.put_string(0, s)
  ptr
end