lune/tests/ffi/pretty_print/ptr.luau
2024-11-09 12:46:20 +00:00

6 lines
215 B
Text

local ffi = require("@lune/ffi")
local c = ffi.c
assert(typeof(c.int:ptr()) :: string == "CPtrInfo")
assert(tostring(c.int:ptr()) == "int")
assert(tostring(c.int:arr(5):ptr()) == " <CArrInfo( int, length = 5 )> ")