Re: C data reflection in LuaJIT

  • From: Peter Colberg <peter@xxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sun, 5 Oct 2014 15:15:24 -0400

On Sun, Oct 05, 2014 at 01:32:37PM +0200, Mike Pall wrote:
> I think that API is not minimal enough and incomplete, too. I'd go
> for a single low-level function that only does a ctype_get() with
> bounds-checked CTypeID, returning a CType* cdata object or nil.
> Adding the definition of CType* to the predefined types is
> probably the trickiest part of that.

Would you accept a CType userdata that exposes ctype_ macros on
ct->info as methods and ct->name as a string? That would avoid
replicating parts of the internal API of lj_obj.h and lj_ctype.h.

Peter

Other related posts: