class FFI::StrPtrConverter

Public Class Methods

from_native(val, ctx) click to toggle source

@param [Pointer] val @param ctx @return [Array(String, Pointer)] Returns a [ String, Pointer ] tuple so the C memory for the string can be freed

# File lib/ffi/types.rb, line 161
def self.from_native(val, ctx)
  [ val.null? ? nil : val.get_string(0), val ]
end