mirror of
https://github.com/logos-messaging/nim-ffi.git
synced 2026-07-30 19:43:17 +00:00
17 lines
346 B
Nim
17 lines
346 B
Nim
## Must fail: `{.ffiStatic.}` handle param (see tests/unit/test_ffistatic_reject.nim).
|
|
|
|
import ffi, chronos
|
|
|
|
type StaticLib = object
|
|
base: int
|
|
|
|
declareLibrary("staticrej", StaticLib)
|
|
|
|
type Session {.ffiHandle.} = ref object
|
|
id: int
|
|
|
|
proc staticrejBad*(s: Session): Future[Result[int, string]] {.ffiStatic.} =
|
|
return ok(s.id)
|
|
|
|
genBindings()
|