Peter Colberg wrote: > Could you take a quick look at the attached patch and test? It adds > three minimal functions ffi.elemtypeof(), ffi.fieldtypeof(), and > ffi.fieldsof(). 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. --Mike