Class: FFI::StrPtrConverter
- Inherits:
-
Object
- Object
- FFI::StrPtrConverter
- Extended by:
- DataConverter
- Defined in:
- lib/ffi/types.rb
Class Method Summary collapse
-
.from_native(val, ctx) ⇒ Array(String, Pointer)
Returns a [ String, Pointer ] tuple so the C memory for the string can be freed.
Methods included from DataConverter
from_native, native_type, to_native
Class Method Details
.from_native(val, ctx) ⇒ Array(String, Pointer)
Returns a [ String, Pointer ] tuple so the C memory for the string can be freed
161 162 163 |
# File 'lib/ffi/types.rb', line 161 def self.from_native(val, ctx) [ val.null? ? nil : val.get_string(0), val ] end |