File: struct_by_reference.rbs

package info (click to toggle)
ruby-ffi 1.17.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,988 kB
  • sloc: ruby: 9,446; ansic: 7,713; xml: 151; sh: 51; makefile: 14
file content (11 lines) | stat: -rw-r--r-- 365 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
module FFI
  class StructByReference[S < Struct[P, untyped], P < AbstractMemory]
    include DataConverter[P, S, untyped]
    attr_reader struct_class: Struct[P, untyped]

    def initialize: (S struct_class) -> void
    def from_native: (P value, untyped ctx) -> S
    def native_type: () -> Type::Builtin
    def to_native: (S? value, untyped ctx) -> P
  end
end