lua-users home
lua-l archive

Re: getmetatable(cdata) return string 'ffi', why not a table

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sat, Jun 11, 2011 at 7:26 AM, zhiguo zhao <zhaozg@gmail.com> wrote:
cdata create with ffi.new.

getmetatable(cdata) return string 'ffi', why not a table

when use ffi, we need to handle getmetatable not return table.



FFI does not support "normal" metatables, you can only use ffi.metatype (see the docs) to create metatables...

Justin


AltStyle によって変換されたページ (->オリジナル) /