Class: FFI::StrPtrConverter

### Home Classes Methods

### In Files

- lib/ffi/types.rb

### Parent

Object

### Methods

- ::from_native

### Class/Module Index

Quicksearch

- FFI
- FFI::AutoPointer
- FFI::AutoPointer::CallableReleaser
- FFI::AutoPointer::DefaultReleaser
- FFI::AutoPointer::Releaser
- FFI::ConstGenerator
- FFI::ConstGenerator::Constant
- FFI::Enum
- FFI::Enums
- FFI::Generator
- FFI::Generator::Task
- FFI::IO
- FFI::ManagedStruct
- FFI::Platform
- FFI::PlatformError
- FFI::Pointer
- FFI::StrPtrConverter
- FFI::Struct
- FFI::Struct::ManagedStructConverter
- FFI::StructGenerator
- FFI::StructGenerator::Field
- FFI::StructLayout
- FFI::StructLayout::Enum
- FFI::StructLayout::InnerStruct
- FFI::StructLayout::Mapped
- FFI::StructLayoutBuilder
- FFI::TypesGenerator
- FFI::Union
- FFI::VariadicInvoker

No matching classes.

# 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.