12 lines
376 B
Plaintext
12 lines
376 B
Plaintext
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: (?ffi_auto_type? type) -> Type
|
|
def to_native: (S? value, untyped ctx) -> P
|
|
end
|
|
end
|