Files
news.gitea.happylizard.me/bin/gems/ffi-1.17.4-x86_64-linux-gnu/sig/ffi/function.rbs
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

40 lines
1.1 KiB
Plaintext

module FFI
interface _Function
# TODO: leads to a endless recursion when used with -rrbs/test/setup
# def attach: (Module mod, String name) -> self
def call: (*untyped args) -> untyped
def param_types: () -> Array[Type]
def return_type: () -> Type
end
class Function < Pointer
include _Function
# ?blocking: boolish?, ?convention: Library::convention?, ?enums: Enums?
def initialize:
(
ffi_type return_type, Array[ffi_type] param_types,
?Hash[Symbol, untyped] options
) { (*untyped) -> untyped } -> self
| (
ffi_type return_type, Array[ffi_type] param_types, Proc | Pointer proc,
?Hash[Symbol, untyped] options
) -> self
def autorelease?: ...
alias autorelease autorelease?
def autorelease=: ...
def free: () -> self
end
class VariadicInvoker
include _Function
def initialize:
(
Pointer function, Array[ffi_type] parameter_types, ffi_type return_type,
Hash[Symbol, untyped] options #TODO
) -> void
def invoke: (Array[Type] parameter_types, Array[untyped] parameter_values) -> untyped
end
end