lua-users home
lua-l archive

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


Javier Guerra Giraldez wrote:
> it never calls my __tostring() metamethod. it seems that it's because
> the cdata contains a FILE*, and not a FILE.

It works now. Please see my other message.

> but i can't do:
> 
> ffi.metatype ('FILE *')
> 
> nor:
> 
> local file_tp = ffi.typeof ('FILE *')
> ffi.metatype (file_tp, {.....})

Nor should this work. Metatypes are always bound to the underlying
aggregate and not to any pointer type.

--Mike