You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ffi.cdef[[ struct ImVec4 { float x,y,z,w; }; ]]
reflect.typeof(ffi.typeof(" struct ImVec4")) -- okay
reflect.typeof(ffi.typeof("const struct ImVec4")) -- complains due to some TODO
error :
./reflect.lua:208: TODO: CTA_QUAL
stack traceback:
[C]: in function 'error'
./reflect.lua:208: in function 'CTA'
./reflect.lua:281: in function 'typeof'
which is into those lines belonging to reflect.lua :
-- Logic for merging an attribute CType onto the annotated CType.
local CTAs = {[0] =
function(a, refct) error("TODO: CTA_NONE") end,
function(a, refct) error("TODO: CTA_QUAL") end, <<< ERROR THERE
function(a, refct)
a = 2^a.value
refct.alignment = a
refct.attributes.align = a
end,
function(a, refct)
refct.transparent = true
refct.attributes.subtype = refct.typeid
end,
function(a, refct) refct.sym_name = a.name end,
function(a, refct) error("TODO: CTA_BAD") end,
}
where info is getted as bit.bor(ctype.info,ctype.size) @corsix does it make sense?
as for CTA_NONE it should be function(a, refct) end, because CTA_NONE does not appear in the whole luajit codebase except for its definition where it says /* Ignored attribute. Must be zero. */
Hello, I'm encountering the following
error :
which is into those lines belonging to
reflect.lua
:The "types" that I get in input are not under my control, I get those
const ImVec4
from a 3rd party : https://github.com/cimgui/cimgui/blob/docking_inter/generator/output/definitions.luaOf course I could also workaround my problem by tricking my code into stripping the
const
problematics toreflect.typeof()
Would you have time... to do... this
TODO: CTA_QUAL
? :)Thanks,
Kind Regards
The text was updated successfully, but these errors were encountered: