22--- @meta
33
44--- @class ffi.namespace* : table
5+ --- @field [ string] function
56
6- --- @class ffi.cdecl* : string
77--- @class ffi.ctype* : userdata
8+ --- @overload fun ( init ?: any , ... ): ffi.cdata*
9+ --- @overload fun ( nelem ?: integer , init ?: any , ... ): ffi.cdata*
810local ctype
11+
12+ --- @class ffi.cdecl* : string
913--- @class ffi.cdata* : userdata
10- --- @alias ffi.ct* ffi.cdecl * | ffi.ctype * | ffi.cdata*
11- --- @class ffi.cb* : userdata
14+ --- @alias ffi.ct* ffi.ctype * | ffi.cdecl * | ffi.cdata*
15+ --- @class ffi.cb* : ffi.cdata*
1216local cb
1317--- @class ffi.VLA* : userdata
1418--- @class ffi.VLS* : userdata
@@ -20,35 +24,34 @@ local cb
2024--- @field arch string
2125local ffi = {}
2226
23- --- @param def string
24- function ffi .cdef (def ) end
27+ --- @param def string
28+ --- @param params ? any
29+ function ffi .cdef (def , params , ...) end
2530
2631--- @param name string
2732--- @param global ? boolean
2833--- @return ffi.namespace* clib
2934--- @nodiscard
3035function ffi .load (name , global ) end
3136
37+ --- @overload fun ( ct : ffi.ct* , init : any , ... )
3238--- @param ct ffi.ct*
3339--- @param nelem ? integer
3440--- @param init ? any
3541--- @return ffi.cdata* cdata
3642--- @nodiscard
3743function ffi .new (ct , nelem , init , ...) end
3844
39- --- @param nelem ? integer
40- --- @param init ? any
41- --- @return ffi.cdata* cdata
42- function ffi .ctype (nelem , init , ...) end
43-
44- --- @param ct ffi.ct*
45+ --- @param ct ffi.ct*
46+ --- @param params ? any
4547--- @return ffi.ctype* ctype
4648--- @nodiscard
47- function ffi .typeof (ct ) end
49+ function ffi .typeof (ct , params , ... ) end
4850
4951--- @param ct ffi.ct*
5052--- @param init any
5153--- @return ffi.cdata* cdata
54+ --- @nodiscard
5255function ffi .cast (ct , init ) end
5356
5457--- @param ct ffi.ct*
0 commit comments