Sha256: 6f19325495f86c4d7efb80b3479df4864a3ce9319fdadb34fecad2f4a99a3dea

Contents?: true

Size: 1.49 KB

Versions: 1431

Compression:

Stored size: 1.49 KB

Contents

module FFI
  type pointer = Pointer::_ToPtr? | Integer
  class Pointer < AbstractMemory
    interface _ToPtr
      def to_ptr: () -> Pointer
    end
    include _ToPtr

    SIZE: Integer
    NULL: Pointer
    def self.size: () -> Integer

    def initialize: (?AbstractMemory::type_size type, (Pointer | Integer) address) -> void
    def +: (Integer offset) -> Pointer
    def ==: (Pointer? other) -> bool
    def address: () -> Integer
    alias to_i address
    def autorelease?: () -> bool
    def autorelease=: (boolish autorelease) -> boolish
    def free: () -> self
    def inspect: ...
    def null?: () -> bool
    def order: () -> AbstractMemory::order_out
             | (AbstractMemory::order_in) -> Pointer
    def read: (ffi_type type) -> top
    def read_array_of_type: (ffi_auto_type type, Symbol reader, Integer length) -> Array[top]
    def read_string: (?Integer? len) -> String
    def read_string_length: (Integer len) -> String
    def read_string_to_null: () -> String
    def slice: (Integer offset, Integer length) -> Pointer
    def type_size: () -> Integer
    def write: (ffi_type type, top value) -> nil
    def write_array_of_type: (ffi_auto_type type, Symbol writer, Array[top]) -> self
    def write_string: (String str, ?Integer? len) -> self
    def write_string_length: (String str, Integer len) -> self
  end

  class MemoryPointer < Pointer
    def initialize: (AbstractMemory::type_size size, ?Integer count, ?boolish clear) -> self
    def self.from_string: (String s) -> instance
  end
end

Version data entries

1,431 entries across 1,431 versions & 15 rubygems

Version Path
ffi-1.17.0-x86-mingw32 sig/ffi/pointer.rbs
ffi-1.17.0.rc2 sig/ffi/pointer.rbs
ffi-1.17.0.rc2-java sig/ffi/pointer.rbs
ffi-1.17.0.rc2-arm64-darwin sig/ffi/pointer.rbs
ffi-1.17.0.rc2-x86_64-darwin sig/ffi/pointer.rbs
ffi-1.17.0.rc2-aarch64-linux-musl sig/ffi/pointer.rbs
ffi-1.17.0.rc2-aarch64-linux-gnu sig/ffi/pointer.rbs
ffi-1.17.0.rc2-arm-linux-musl sig/ffi/pointer.rbs
ffi-1.17.0.rc2-arm-linux-gnu sig/ffi/pointer.rbs
ffi-1.17.0.rc2-x86_64-linux-musl sig/ffi/pointer.rbs
ffi-1.17.0.rc2-x86_64-linux-gnu sig/ffi/pointer.rbs
ffi-1.17.0.rc2-x86-linux-musl sig/ffi/pointer.rbs
ffi-1.17.0.rc2-x86-linux-gnu sig/ffi/pointer.rbs
ffi-1.17.0.rc2-x64-mingw32 sig/ffi/pointer.rbs
ffi-1.17.0.rc2-x64-mingw-ucrt sig/ffi/pointer.rbs
ffi-1.17.0.rc2-x86-mingw32 sig/ffi/pointer.rbs
ffi-1.17.0.rc1 sig/ffi/pointer.rbs
ffi-1.17.0.rc1-java sig/ffi/pointer.rbs
ffi-1.17.0.rc1-arm64-darwin sig/ffi/pointer.rbs
ffi-1.17.0.rc1-x86_64-darwin sig/ffi/pointer.rbs