Simon Cooke wrote: > Now to make this type-safe I can check the corresponding ctype number > for the cdata [2] by essentially invoking 'tonumber(ffi.typeof(c))' > via the C API, but is there an easier/quicker/undocumented way to get > this information directly? Nope. The FFI and the classic Lua/C API don't mix. But I wonder why you're worrying about type-safety when this is only for the purpose of migration, anyway? --Mike