Closed vsergeev closed 3 years ago
local ffi = jit and require('ffi') or require('cffi') ffi.cdef[[ typedef struct point { int x; int y; } point_t; ]] print(ffi.typeof("point_t")) --> ctype<struct point> print(ffi.typeof("point_t *")) --> ctype<struct point *> print(ffi.typeof("$ *", ffi.typeof("point_t"))) --> expected: ctype<struct point *>, get: ctype<struct point>
I'm expecting a pointer type for the parametrized typeof ffi.typeof("$ *", ffi.typeof("point_t"), but am getting the underlying structure type.
ffi.typeof("$ *", ffi.typeof("point_t")
Running off of 07b30b0.
this one was kind of silly, the parsing and everything was actually working right, but it was returning an incorrect value on the lua stack :P
Great, thanks :+1: Works for me now.
I'm expecting a pointer type for the parametrized typeof
ffi.typeof("$ *", ffi.typeof("point_t")
, but am getting the underlying structure type.Running off of 07b30b0.