Method: FFI::MemoryPointer.from_string
- Defined in:
- lib/childprocess/unix/lib.rb
.from_string(str) ⇒ Object
179 180 181 182 183 184 |
# File 'lib/childprocess/unix/lib.rb', line 179 def self.from_string(str) ptr = new(1, str.bytesize + 1) ptr.write_string("#{str}\0") ptr end |