For this particular one, the answer was access to the internals of ffi through interop. I think this is a good approach because it doesn't bloat up the whole of LuaJIT to provide this information. I myself have turned towards the 'meta' route. That way, I can generate whatever I want. Creating the c-types to go within a ffi.cdef[[]] block is just another output once you go meta. You can easily get unit tests and the like. I'd go even further and say my meta representation of things is my "spec", and I just codegen to LuaJIT/whatever, when appropriate. -- William =============================== - Shaping clay is easier than digging it out of the ground. http://williamaadams.wordpress.com http://www.thingiverse.com/WilliamAAdams https://github.com/Wiladams ---------------------------------------- > From: cosmin.apreutesei@xxxxxxxxx > Date: Wed, 30 May 2012 00:52:36 +0300 > Subject: Re: another small wish > To: luajit@xxxxxxxxxxxxx > > 3) issue > ffi introspection (this has been asked before and probably answered, > but I'll give my reasons), especially struct fields (name & type). > > 3) story > Automatic testing (eg. code generation for unit tests stubs). > Debugging tools (eg. pretty-print a struct). > > >